Update app.py
Browse files
app.py
CHANGED
@@ -92,13 +92,16 @@ def download_gitlab_repo():
|
|
92 |
|
93 |
|
94 |
def extract_single_zip_file(directory):
|
95 |
-
|
96 |
|
97 |
-
if not
|
98 |
print("No zip file found in the directory.")
|
|
|
|
|
|
|
|
|
99 |
else:
|
100 |
-
|
101 |
-
zip_file_path = os.path.join(directory, zip_file)
|
102 |
|
103 |
# Create a temporary directory for the zip file
|
104 |
with tempfile.TemporaryDirectory() as tmpdirname:
|
|
|
92 |
|
93 |
|
94 |
def extract_single_zip_file(directory):
|
95 |
+
zip_files = [file for file in os.listdir(directory) if file.endswith('.zip')]
|
96 |
|
97 |
+
if not zip_files:
|
98 |
print("No zip file found in the directory.")
|
99 |
+
|
100 |
+
if len(zip_files) > 1:
|
101 |
+
print("More than one zip file found.")
|
102 |
+
return
|
103 |
else:
|
104 |
+
zip_file_path = os.path.join(directory, zip_file[0])
|
|
|
105 |
|
106 |
# Create a temporary directory for the zip file
|
107 |
with tempfile.TemporaryDirectory() as tmpdirname:
|