gallery.py: Use Python-3-compatible exception syntax
authorW. Trevor King <wking@tremily.us>
Mon, 9 Dec 2013 04:34:05 +0000 (20:34 -0800)
committerW. 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

index baacbd892b0a8879764a5f74e153b7228cb7414a..1a3c958753c0093460e7e561c67c59227cfc88d5 100755 (executable)
@@ -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()