Skip to content

Commit

Permalink
Where an exception object is used, uses the string representation of it.
Browse files Browse the repository at this point in the history
Where not used, does not initialize one.
  • Loading branch information
jayr0d committed Dec 8, 2012
1 parent 99ec07c commit 9f31ba4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gnome-shell-google-calendar.py
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 9f31ba4

Please sign in to comment.