1001_fix_syntax_error.patch 1.1 KB
Newer Older
Jonas Smedegaard's avatar
Jonas Smedegaard committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
Description: Fix syntax errors
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2019-01-31
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/ontospy/extras/dbpedia.py
+++ b/ontospy/extras/dbpedia.py
@@ -98,10 +98,10 @@
 
     if len(args) > 0:  #dont take no args
         parser.print_help()
-        raise SystemExit, 1
+        raise SystemExit(1)
     if not (opts.query or opts.describe or opts.alltriples or opts.ontology):
         parser.print_help()
-        raise SystemExit, 1
+        raise SystemExit(1)
     return opts, args
 
 
@@ -161,7 +161,7 @@
     try:
         main()
         sys.exit(0)
-    except KeyboardInterrupt, e: # Ctrl-C
+    except KeyboardInterrupt as e: # Ctrl-C
         raise e
 
 
--- a/ontospy/extras/sparqlpy.py
+++ b/ontospy/extras/sparqlpy.py
@@ -268,7 +268,7 @@
 
 	if len(args) < 1:
 		parser.print_help()
-		raise SystemExit, 1
+		raise SystemExit(1)
 
 	return opts, args
 
@@ -332,5 +332,5 @@
     try:
         main()
         sys.exit(0)
-    except KeyboardInterrupt, e: # Ctrl-C
+    except KeyboardInterrupt as e: # Ctrl-C
         raise e