Skip to content

Commit 7100f9d

Browse files
committed
py3k compatibility
1 parent 187d11a commit 7100f9d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

virtualenvwrapper/hook_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def run_hooks(hook, options, args, output=None):
134134
continue
135135
plugin = ep.load()
136136
if options.listing:
137-
print ' %-10s -- %s' % (ep.name, inspect.getdoc(plugin) or '')
137+
sys.stdout.write(' %-10s -- %s' % (ep.name, inspect.getdoc(plugin) or '')
138138
continue
139139
if options.sourcing:
140140
# Show the shell commands so they can

virtualenvwrapper/user_scripts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def run_script(script_path, *args):
3737
log.debug('running %s', str(cmd))
3838
try:
3939
return_code = subprocess.call(cmd)
40-
except OSError, msg:
40+
except OSError:
41+
_, msg, _ = sys.exc_info()
4142
log.error('could not run "%s": %s', script_path, str(msg))
4243
#log.debug('Returned %s', return_code)
4344
return

0 commit comments

Comments
 (0)