Skip to content
This repository has been archived by the owner on Aug 24, 2020. It is now read-only.

Commit

Permalink
Merge pull request #22 from ilkin/patch-1
Browse files Browse the repository at this point in the history
Issue #21
  • Loading branch information
jamiesun committed Mar 8, 2014
2 parents 1f6d33f + b2f54b3 commit cbefa0b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sublime_evernote.py
Expand Up @@ -48,7 +48,7 @@ def connect(self,callback,**kwargs):
def _connect(authToken):
try:
callback(**kwargs)
except Exception,e:
except Exception as e:
sublime.error_message("error:%s"%e)

def on_verifier(verifier):
Expand Down Expand Up @@ -129,14 +129,14 @@ def sendnote(title,tags):
cnote = noteStore.createNote(authToken, note)
sublime.status_message("send success guid:%s"%cnote.guid)
sublime.message_dialog("success")
except Errors.EDAMUserException,e:
except Errors.EDAMUserException as e:
args = dict(title=title,tags=tags)
if e.errorCode == 9:
self.connect(self.send_note,**args)
else:
if sublime.ok_cancel_dialog('error %s! retry?'%e):
self.connect(self.send_note,**args)
except Exception,e:
except Exception as e:
sublime.error_message('error %s'%e)

def on_title(title):
Expand All @@ -158,4 +158,4 @@ def run(self, edit):
if not settings.get("oauth_token") and not settings.get("noteStoreUrl"):
self.connect(self.send_note)
else:
self.send_note()
self.send_note()

0 comments on commit cbefa0b

Please sign in to comment.