diff options
Diffstat (limited to 'Code/update_network.py')
-rwxr-xr-x | Code/update_network.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Code/update_network.py b/Code/update_network.py index e8d5a1d..d5aed9b 100755 --- a/Code/update_network.py +++ b/Code/update_network.py @@ -47,6 +47,7 @@ import time import subprocess from datetime import datetime from param4net import make_global_param_dict, get_key_value +from log import write_log_file from configure import HISTORY_DIR, HISTORY_DIR2, FILE_TIMESTAMP, SAMPLE_SIZE_FILE, TEMP_DIR, \ PARAMETER_FOR_BUILDCMATRIX, PARAMETER_FOR_BUILDRMATRIX, \ PARAMETER_FOR_NET, PARAMETER_FOR_NET_TRAVADB_STRESS, PARAMETER_FOR_NET_TRAVADB_MAP, PARAMETER_FOR_NET_MILD_DROUGHT, PARAMETER_FOR_NET_WIGGELAB_DIURNAL, \ @@ -123,17 +124,6 @@ def num_ids(fname): return len(lines[0].split('\t')) - 1 -def write_log_file(s, fname): - f = open(fname, 'a') - curr_time = datetime.now().strftime('%Y-%m-%d %H:%M') - s = '[' + curr_time + ']: ' + s - if not '\n' in s: - s += '\n' - f.write(s) - f.close() - print('Log: %s' % (s.strip())) - - def write_sample_size_file(sample_size_file, curr_date, tpm_sample_size): if not os.path.exists(sample_size_file): f = open(sample_size_file, 'w') |