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