fix
This commit is contained in:
parent
3458cc58e9
commit
e94c8458f0
@ -273,5 +273,4 @@ def create_empty_files(dir_out, net):
|
||||
|
||||
for i in range(7481):
|
||||
name = "0" * (6 - len(str(i))) + str(i) + '.txt'
|
||||
ff = open(os.path.join(dir_out[net], name), "a+")
|
||||
ff.close()
|
||||
with open(os.path.join(dir_out[net], name), "a+"): pass
|
||||
|
||||
@ -161,8 +161,7 @@ def read_and_rewrite(path_orig, path_new):
|
||||
line_new = temp_1 + ' ' + hwl + ' ' + temp_2 + '\n'
|
||||
ff.write("%s" % line_new)
|
||||
except FileNotFoundError:
|
||||
ff = open(path_new, "a+")
|
||||
ff.close()
|
||||
with open(path_new, "a+"): pass
|
||||
|
||||
|
||||
def find_cluster(dd, clusters):
|
||||
|
||||
@ -443,4 +443,3 @@ def social_distance_colors(colors, dic_out):
|
||||
# Prepare color for social distancing
|
||||
colors = ['r' if flag else colors[idx] for idx,flag in enumerate(dic_out['social_distance'])]
|
||||
return colors
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user