Skip to content

Commit e99f776

Browse files
style: format code with autopep8
Format code with autopep8 This commit fixes the style issues introduced in b96cc8d according to the output from Autopep8. Details: None
1 parent d0ee849 commit e99f776

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Automated Script/Script.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import shutil
33

4+
45
def automated_backup(source_dir, destination_dir):
56
try:
67
# Check if the source directory exists
@@ -15,16 +16,19 @@ def automated_backup(source_dir, destination_dir):
1516
for root, dirs, files in os.walk(source_dir):
1617
for file in files:
1718
source_file = os.path.join(root, file)
18-
destination_file = os.path.join(destination_dir, os.path.relpath(source_file, source_dir))
19+
destination_file = os.path.join(
20+
destination_dir, os.path.relpath(source_file, source_dir))
1921
shutil.copy2(source_file, destination_file)
2022

2123
print("Backup completed successfully!")
2224
except Exception as e:
2325
print(f"An error occurred during backup: {e}")
2426

27+
2528
if __name__ == '__main__':
2629
source_directory = input("Enter the source directory to be backed up: ")
27-
destination_directory = input("Enter the destination directory for the backup: ")
30+
destination_directory = input(
31+
"Enter the destination directory for the backup: ")
2832

2933
automated_backup(source_directory, destination_directory)
3034
'''

0 commit comments

Comments
 (0)