Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Merge 7d3e9e2 into fe5404e
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolCoderCarl authored Jun 15, 2022
2 parents fe5404e + 7d3e9e2 commit ef37c3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Release

on:
push:
pull_request:
branches: [ main ]
paths-ignore:
- 'README.md'
Expand Down
10 changes: 5 additions & 5 deletions butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from zipfile import ZipFile

# Archive extensions to exclude when archiving
archives_extension = [".zip", ".7z", ".gz", ".bz", ".gzip", ".bzip", ".iso"]
archives_extension = [".zip", ".7z", ".gz", ".bz", ".gzip", ".bzip", ".iso", ".rar"]


def get_args():
Expand Down Expand Up @@ -152,7 +152,7 @@ def get_files_extension(path_to_dir: str, special_ext="") -> Set:
list_dir = os.listdir(path_to_dir)

if len(list_dir) == 0:
exit(1)
exit(0)

files = [file for file in list_dir if os.path.isfile(path_to_dir + file)]
result = []
Expand Down Expand Up @@ -180,7 +180,7 @@ def get_files_to_combine(path_to_dir: str, special_files_extensions: str) -> Set
list_dir = os.listdir(path_to_dir)

if len(list_dir) == 0:
exit(1)
exit(0)

files = [file for file in list_dir if os.path.isfile(path_to_dir + file)]

Expand Down Expand Up @@ -235,7 +235,7 @@ def clean_the_dir(path_to_clean: str):
else:
if len(os.listdir(path_to_clean)) == 0:
delete_empty_dir(namespace.force, namespace.source)
exit(1)
exit(0)
else:
for filename in os.listdir(path_to_clean):
path = os.path.join(path_to_clean, filename)
Expand Down Expand Up @@ -284,7 +284,7 @@ def create_archive(dir_to_archive: str):
exit(1)
else:
if len(os.listdir(dir_to_archive)) == 0:
exit(1)
exit(0)
else:
with ZipFile(str(date_time) + ".zip", "w") as zip_obj:
for folder_name, sub_folders, filenames in os.walk(dir_to_archive):
Expand Down

0 comments on commit ef37c3f

Please sign in to comment.