Show More
@@ -5,8 +5,8 b' import os' | |||
|
5 | 5 | import datetime |
|
6 | 6 | import sys |
|
7 | 7 | import subprocess |
|
8 |
logging.basicConfig(level |
|
|
9 |
format |
|
|
8 | logging.basicConfig(level=logging.DEBUG, | |
|
9 | format="%(asctime)s %(levelname)-5.5s %(message)s") | |
|
10 | 10 | |
|
11 | 11 | class BackupManager(object): |
|
12 | 12 | def __init__(self): |
@@ -67,11 +67,17 b' class BackupManager(object):' | |||
|
67 | 67 | |
|
68 | 68 | subprocess.Popen(cmd) |
|
69 | 69 | logging.info('Transfered file %s to %s', self.backup_file_name, cmd[4]) |
|
70 | ||
|
71 | ||
|
72 | def rm_file(self): | |
|
73 | os.remove(self.backup_file_path) | |
|
74 | ||
|
70 | 75 | |
|
71 | 76 | |
|
72 | 77 | if __name__ == "__main__": |
|
73 | 78 | bm = BackupManager() |
|
74 | 79 | bm.backup_repos() |
|
75 | 80 | bm.transfer_files() |
|
81 | bm.rm_file() | |
|
76 | 82 | |
|
77 | 83 |
General Comments 0
You need to be logged in to leave comments.
Login now