Switching the syntax of this exception-raise
authorChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 6 Jul 2012 14:06:01 +0000 (09:06 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 6 Jul 2012 14:06:01 +0000 (09:06 -0500)
It's nicer to raise exceptions like
  raise Exception("foo")
than
  raise Exception, "foo"

mediagoblin/tools/files.py

index 315ff5e0b0f43af2c91cb8e7ecf91d9afca1aab4..fd38f05eda6c0fb59d5866d5feeb6f43a5746fd8 100644 (file)
@@ -40,5 +40,4 @@ def delete_media_files(media):
             no_such_files.append("/".join(attachment))
 
     if no_such_files:
-        # This breaks pep8 as far as I know
-        raise OSError, ", ".join(no_such_files)
+        raise OSError(", ".join(no_such_files))