Browse files

Merge pull request #36 from jayr0d/master

Where an exception object is used, uses the string representation of it.  Where not used, does not initialize one.
  • Loading branch information...
2 parents 99ec07c + 9f31ba4 commit 0fa6c396b37ef2b372ebeae97206057e2585f73b @vintitres committed Dec 9, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 gnome-shell-google-calendar.py
View
8 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)

0 comments on commit 0fa6c39

Please sign in to comment.