Commits

Anonymous committed 7100f9d

py3k compatibility

  • Participants
  • Parent commits 187d11a

Comments (0)

Files changed (2)

virtualenvwrapper/hook_loader.py

             continue
         plugin = ep.load()
         if options.listing:
-            print '  %-10s -- %s' % (ep.name, inspect.getdoc(plugin) or '')
+            sys.stdout.write('  %-10s -- %s' % (ep.name, inspect.getdoc(plugin) or '')
             continue
         if options.sourcing:
             # Show the shell commands so they can

virtualenvwrapper/user_scripts.py

         log.debug('running %s', str(cmd))
         try:
             return_code = subprocess.call(cmd)
-        except OSError, msg:
+        except OSError:
+            _,  msg, _ = sys.exc_info()
             log.error('could not run "%s": %s', script_path, str(msg))
         #log.debug('Returned %s', return_code)
     return