summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrent s <bts@square-r00t.net>2019-01-21 15:59:18 -0500
committerbrent s <bts@square-r00t.net>2019-01-21 15:59:18 -0500
commitfaa79046d3cc177b472c28af47a79f8e265e0d98 (patch)
treeb01ef5992d83abb0fa94444d4c734e3b921a9d58
parente0ed3346aafb98f128bd0ca4beaead9849a354ef (diff)
downloadPodloader-rewrite.tar.xz
more useful error outputHEADrewritemaster
-rwxr-xr-xpodloader.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/podloader.py b/podloader.py
index b780687..e5f90e3 100755
--- a/podloader.py
+++ b/podloader.py
@@ -438,9 +438,9 @@ def dbEntry(conf):
cur.execute(query)
cur.close()
conn.close()
- except:
- print('{0}: There seems to have been some error when inserting into the DB. Check access (or it is a dupe).'.format(
- datetime.datetime.now()))
+ except Exception as e:
+ print('{0}: There seems to have been some error when inserting into the DB: {1}'.format(
+ datetime.datetime.now(), e))
def signEp(mediatype, conf):
# No reason to call this for each file. Fix.
@@ -494,8 +494,9 @@ def uploadFile(conf):
# and create if it doesn't exist.
# Also, no reason to call this for each file.
print('{0}: Syncing files to server...'.format(datetime.datetime.now()))
- subprocess.call(['rsync',
+ subprocess.run(['rsync',
'-a',
+ '--info=progress2',
'{0}'.format(conf['local']['mediadir']),
'{0}@{1}:{2}S{3}/.'.format(conf['rsync']['user'],
conf['rsync']['host'],