Commits

Naoki INADA committed 1f08728

Fix Python 3 error.

Comments (0)

Files changed (1)

ropemode/decorators.py

+from __future__ import print_function
 import traceback
 
 from rope.base import exceptions
 
     def _show(self, message):
         if message is None:
-            print message
+            print(message)
         else:
             self.message(message)
 
     def newfunc(*args, **kwds):
         try:
             func(*args, **kwds)
-        except Exception, e:
+        except Exception as e:
             trace = str(traceback.format_exc())
             short = 'Ignored an exception in ropemode hook: %s' % \
                     _exception_message(e)
     def newfunc(*args, **kwds):
         try:
             return func(*args, **kwds)
-        except exceptions.RopeError, e:
+        except exceptions.RopeError as e:
             short = None
             if isinstance(e, input_exceptions):
                 if not raise_exceptions: