[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 2de5fe6389125ddcb0805dd16737ed9dce462129
Author: Sukhbir Singh <s3singh@xxxxxxxxxxxx>
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
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits