Source

gett-cli / gett_uploader.py

Diff from to

gett_uploader.py

     try:
         main()
     except APIError as ex:
-        print('API error: %s' % ex)
+        logger.error('API error: %s', ex)
 
 def pattern(string):
     import glob
                 ret.append(open(item, 'rb'))
 
     if not ret:
-        print('warning: %s: no match' % string)
+        logger.warning('%s: no match', string)
     return ret
 
 def main():
 
         try:
             user.login_auth(args.email, args.password)
-        except Exception as ex:
-            print('Unable to login: %s' % ex.args[0])
+        except APIError as ex:
+            logger.error('Unable to login: %s', ex)
             sys.exit(1)
 
         reply = input('Do you wish to store the session token? (y/n): ')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.