From 9f31ba483eb9b2aaf898d4bc721a379bdf39d09d Mon Sep 17 00:00:00 2001 From: Jared Silva Date: Sat, 8 Dec 2012 10:20:32 -0500 Subject: [PATCH] Where an exception object is used, uses the string representation of it. Where not used, does not initialize one. --- gnome-shell-google-calendar.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnome-shell-google-calendar.py b/gnome-shell-google-calendar.py index fa579f8..b4a33dc 100755 --- a/gnome-shell-google-calendar.py +++ b/gnome-shell-google-calendar.py @@ -42,7 +42,7 @@ def wrapper(*args, **kwargs): return ret except Exception as e: import traceback - print '*** Exception:', e + print '*** Exception:', str(e) traceback.print_exc() raise return wrapper @@ -249,7 +249,7 @@ def get_calendars(self): feed = self.client.GetAllCalendarsFeed() break except Exception as e: - print '*** Exception:', e + print '*** Exception:', str(e) print ('Error retrieving all calendars. ' 'Trying again in 5 seconds...') sleep(5) @@ -464,7 +464,7 @@ def GetEvents(self, since, until, force_reload): print "Logging in as '%s'..." % account try: client = oauth.oauth_login(account) - except Exception as e: + except Exception: print 'Error logging in as \'%s\'' % account print ('\'%s\' may not be a GNOME online account. ' 'A list of existing accounts is below.') % account @@ -475,7 +475,7 @@ def GetEvents(self, since, until, force_reload): 'accounts.html') try: account = oauth.oauth_prompt() - except ValueError as e: + except ValueError: print ('You have entered an invalid account number. ' 'Please enter an integer.') config.set('account', account)