Skip to content

Commit 270b7cc

Browse files
minor fix
1 parent 1282cf3 commit 270b7cc

File tree

3 files changed

+25
-20
lines changed

3 files changed

+25
-20
lines changed

.idea/slimer_script_python.iml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,10 @@
3131

3232
logger_script()
3333

34-
alm = Alerts()
35-
alm.run_script()
34+
# alm = Alerts()
35+
# alm.run_script()
36+
37+
# TODO: os.path ?
38+
# TODO : unit tests
39+
# TODO : exceptions
40+
# TODO : deployment

slimer_script.py

+17-17
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,21 @@ def slimer_script():
4646

4747
logging.info("All paths have been scanned. All backup files are saved")
4848

49-
logging.info('get all files in order to zip theses files')
50-
file_paths_to_zip = get_all_file_paths(SLIMER_SCRIPT_ROOT_LOGS_PATH + "/" + timestamped_directory)
51-
52-
zip_file = zip_files(file_paths_to_zip, SLIMER_SCRIPT_ROOT_LOGS_PATH + "/" + timestamped_directory,
53-
computer_name + "_backup")
54-
55-
# opens the zip file for reading only in binary format in order to upload
56-
opened_zip_file = open(zip_file.filename, "rb")
57-
58-
upload_file_to_server_ftp(opened_zip_file, zip_file.filename)
59-
60-
opened_zip_file.close()
61-
62-
logging.info('deleting local zip file...')
63-
os.remove(zip_file.filename)
64-
65-
logging.info('delete local zip file done')
49+
# logging.info('get all files in order to zip theses files')
50+
# file_paths_to_zip = get_all_file_paths(SLIMER_SCRIPT_ROOT_LOGS_PATH + "/" + timestamped_directory)
51+
#
52+
# zip_file = zip_files(file_paths_to_zip, SLIMER_SCRIPT_ROOT_LOGS_PATH + "/" + timestamped_directory,
53+
# computer_name + "_backup")
54+
#
55+
# # opens the zip file for reading only in binary format in order to upload
56+
# opened_zip_file = open(zip_file.filename, "rb")
57+
#
58+
# upload_file_to_server_ftp(opened_zip_file, zip_file.filename)
59+
#
60+
# opened_zip_file.close()
61+
#
62+
# logging.info('deleting local zip file...')
63+
# os.remove(zip_file.filename)
64+
#
65+
# logging.info('delete local zip file done')
6666

0 commit comments

Comments
 (0)