Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions regovar/core/managers/pipeline_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def check_manifest(self, manifest):
missing += k + ", "
if missing != "":
missing = missing[:-2]
raise RegovarException("FAILLED Checking validity of manifest (missing : {})".format(missing))
raise RegovarException("FAILED Checking validity of manifest (missing : {})".format(missing))

# 2- Default value for optional fields in mandatory file
default = {
Expand All @@ -196,7 +196,7 @@ def check_manifest(self, manifest):

# 3- check type
if manifest["type"] not in ["job", "importer", "exporter", "reporter"]:
raise RegovarException("FAILLED Checking validity of manifest (type '{}' not supported)".format(manifest["type"]))
raise RegovarException("FAILED Checking validity of manifest (type '{}' not supported)".format(manifest["type"]))


log('Validity of manifest checked')
Expand Down Expand Up @@ -250,6 +250,10 @@ def __install(self, pipeline):
# remove intermediate folder
if zip_root != "":
zip_root = os.path.join(root_path, zip_root)
# Avoid shutil.move conflict when zip has nested dir with same name (e.g. name/name)
new_name = os.path.join(root_path, str(uuid.uuid4()))
shutil.move(zip_root, new_name)
zip_root = new_name
for filename in os.listdir(zip_root):
shutil.move(os.path.join(zip_root, filename), os.path.join(root_path, filename))
os.rmdir(zip_root)
Expand Down