[tor-commits] [gettor/master] Print the error when uploading files

ilv at torproject.org ilv at torproject.org
Tue Sep 22 23:39:13 UTC 2015


commit 2de5fe6389125ddcb0805dd16737ed9dce462129
Author: Sukhbir Singh <s3singh at uwaterloo.ca>
Date:   Sun Nov 16 19:23:07 2014 +0530

    Print the error when uploading files
---
 dropbox.py |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/dropbox.py b/dropbox.py
index c9cf932..4770c47 100644
--- a/dropbox.py
+++ b/dropbox.py
@@ -19,10 +19,7 @@ import ConfigParser
 import dropbox
 import gettor.core
 
-class UploadError(Exception):
-    pass
-
-def valid_format(file):
+udef valid_format(file):
     """Check for valid bundle format
 
     Check if the given file has a valid bundle format
@@ -124,7 +121,7 @@ def upload_files(basedir, client):
             try:
                 upload = uploader.upload_chunked()
             except dropbox.rest.ErrorResponse, e:
-                UploadError("An error ocurred while uploading %s" % abs_file)
+                print("An error ocurred while uploading %s: %s" % abs_file, e)
         uploader.finish(file)
         print "Uploading %s" % file
 





More information about the tor-commits mailing list