Commits

mdelagra committed 7dc488c

changed all exception message conversion to unicode strings

Comments (0)

Files changed (1)

mercurial_reviewboard/__init__.py

         return make_rbclient(server, username, password, proxy=proxy, 
             apiver=opts.get('apiver'))
     except ReviewBoardError, msg:
-        raise util.Abort(_(str(msg)))
+        raise util.Abort(_(unicode(msg)))
 
 
 def update_review(request_id, ui, fields, diff, parentdiff, opts):
         if opts['publish']:
             reviewboard.publish(request_id)
     except ReviewBoardError, msg:
-        raise util.Abort(_(str(msg)))
+        raise util.Abort(_(unicode(msg)))
 
 
 def new_review(ui, fields, diff, parentdiff, opts):
         if opts['publish']:
             reviewboard.publish(request_id)
     except ReviewBoardError, msg:
-        raise util.Abort(_(str(msg)))
+        raise util.Abort(_(unicode(msg)))
     
     return request_id
 
     try:
         repositories = reviewboard.repositories()
     except ReviewBoardError, msg:
-        raise util.Abort(_(str(msg)))
+        raise util.Abort(_(unicode(msg)))
 
     if not repositories:
         raise util.Abort(_('no repositories configured at %s' % server))
         server = ui.config('reviewboard', 'server')
     if not server:
         msg = 'please specify a reviewboard server in your .hgrc file or using the --server flag'
-        raise util.Abort(_(str(msg)))
+        raise util.Abort(_(unicode(msg)))
     return server