fixed git sync app (#1247)

* fixed git sync app

* removed shell=True for subprocess call
main
Andrey Zhavoronkov 6 years ago committed by GitHub
parent ec2fa6ee51
commit 7050ad4dec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -271,7 +271,7 @@ class Git:
display_name += " for images" if self._task_mode == "annotation" else " for videos"
cvat_dumper = AnnotationDumper.objects.get(display_name=display_name)
dump_name = os.path.join(db_task.get_task_dirname(),
"git_annotation_{}.".format(timestamp) + "dump")
"git_annotation_{}.xml".format(timestamp))
dump_task_data(
pk=self._tid,
user=user,
@ -283,7 +283,7 @@ class Git:
ext = os.path.splitext(self._path)[1]
if ext == '.zip':
subprocess.call('zip -j -r "{}" "{}"'.format(self._annotation_file, dump_name), shell=True)
subprocess.run(args=['7z', 'a', self._annotation_file, dump_name])
elif ext == '.xml':
shutil.copyfile(dump_name, self._annotation_file)
else:

Loading…
Cancel
Save