summaryrefslogtreecommitdiff
path: root/Code/backup_files.py
diff options
context:
space:
mode:
Diffstat (limited to 'Code/backup_files.py')
-rw-r--r--Code/backup_files.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/Code/backup_files.py b/Code/backup_files.py
index 6105525..0b044f1 100644
--- a/Code/backup_files.py
+++ b/Code/backup_files.py
@@ -9,21 +9,10 @@
import os, sys
from configure import UPDATE_NETWORK_LOG_FILE
from datetime import datetime
+from log import write_log_file
MINIMUM_SPACE_REQUIREMENT = 1 # Gigabytes
-def write_log_file(s, fname):
- if not os.path.exists(fname):
- return None
- 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()
-
-
def make_paths(s):
if not os.path.isdir(s):
os.makedirs(s)