diff -r d60678a567a9 -r 328739ea70c3 hgext/notify.py --- a/hgext/notify.py Tue Jun 23 22:38:21 2015 -0700 +++ b/hgext/notify.py Tue Jun 23 22:20:08 2015 -0700 @@ -276,7 +276,7 @@ p = email.Parser.Parser() try: msg = p.parsestr(data) - except email.Errors.MessageParseError, inst: + except email.Errors.MessageParseError as inst: raise util.Abort(inst) # store sender and subject