|
|
@@ -160,7 +160,7 @@ def upload_video(videofile_path): |
|
|
|
result = os.system('curl -L -u %s -T "%s" "%s"' % (credentials, videofile_path, webdav_url)) |
|
|
|
if result == 0: # exit code |
|
|
|
delete_video(videofile_path) |
|
|
|
return true |
|
|
|
return True |
|
|
|
except: |
|
|
|
logging.info('Error while uploading %s to %s' % (file, webdav_url)) |
|
|
|
|
|
|
@@ -168,7 +168,7 @@ def upload_video(videofile_path): |
|
|
|
def delete_video(file): |
|
|
|
try: |
|
|
|
os.system('rm -rf "%s"' % (file)) |
|
|
|
return true |
|
|
|
return True |
|
|
|
except: |
|
|
|
logging.info('Error while deleting %s' % (file)) |
|
|
|
|
|
|
|