Use preferred form of raising exception with arguments.
authorGeorg Brandl <georg@python.org>
Wed, 3 Oct 2012 21:02:42 +0000 (23:02 +0200)
committerGeorg Brandl <georg@python.org>
Wed, 3 Oct 2012 21:02:42 +0000 (23:02 +0200)
irkerd
irkerhook.py

diff --git a/irkerd b/irkerd
index c9bff9792f471e39c28a975e2a94015c24e4c081..8b39e36a67fcdab8c43bd7cae1dd62ec49e10585 100755 (executable)
--- a/irkerd
+++ b/irkerd
@@ -472,6 +472,6 @@ if __name__ == '__main__':
         while True:
             time.sleep(10)
     except KeyboardInterrupt:
-        raise SystemExit, 1
+        raise SystemExit(1)
 
 # end
index 0d1e284d94a2be61521a197eb9122c7ff2973b56..9451a88c87f84709761a5907fee47f5c9d01f88a 100755 (executable)
@@ -162,7 +162,7 @@ class GenericExtractor:
                 setattr(self, key, int(val))
         if not self.project:
             sys.stderr.write("irkerhook.py: no project name set!\n")
-            raise SystemExit, 1
+            raise SystemExit(1)
         if not self.repo:
             self.repo = self.project.lower()
         if not self.channels:
@@ -267,7 +267,7 @@ class SvnExtractor(GenericExtractor):
         self.do_overrides()
     def head(self):
         sys.stderr.write("irker: under svn, hook requires a commit argument.\n")
-        raise SystemExit, 1
+        raise SystemExit(1)
     def commit_factory(self, commit_id):
         self.id = commit_id
         commit = Commit(self, commit_id)
@@ -437,7 +437,7 @@ if __name__ == "__main__":
             break
     else:
         sys.stderr.write("irkerhook: cannot identify a repository type.\n")
-        raise SystemExit, 1
+        raise SystemExit(1)
     extractor = cls(sys.argv[1:])
 
     # And apply it.