projects
/
blog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
746e3cd
)
gallery.py: Use Python-3-compatible exception syntax
author
W. Trevor King
<wking@tremily.us>
Mon, 9 Dec 2013 04:34:05 +0000
(20:34 -0800)
committer
W. Trevor King
<wking@tremily.us>
Mon, 9 Dec 2013 05:07:04 +0000
(21:07 -0800)
Avoid:
File "/home/wking/bin/gallery.py", line 120
except OSError, e:
^
SyntaxError: invalid syntax
posts/gallery/gallery.py
patch
|
blob
|
history
diff --git
a/posts/gallery/gallery.py
b/posts/gallery/gallery.py
index baacbd892b0a8879764a5f74e153b7228cb7414a..1a3c958753c0093460e7e561c67c59227cfc88d5 100755
(executable)
--- a/
posts/gallery/gallery.py
+++ b/
posts/gallery/gallery.py
@@
-114,7
+114,7
@@
def invoke(args, stdin=None, stdout=_subprocess.PIPE, stderr=_subprocess.PIPE,
try :
q = _subprocess.Popen(args, stdin=_subprocess.PIPE, stdout=stdout,
stderr=stderr, cwd=cwd)
- except OSError
,
e:
+ except OSError
as
e:
raise CommandError(args, status=e.args[0], stderr=e)
stdout,stderr = q.communicate(input=stdin)
status = q.wait()