Commits

Daniel Kraus committed 8e691cf

py3k compatibility

  • Participants
  • Parent commits 39e55b2

Comments (0)

Files changed (2)

File 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

File 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