summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Kacur <jkacur@redhat.com>2018-05-09 08:34:57 +0100
committerJohn Kacur <jkacur@redhat.com>2018-05-09 08:34:57 +0100
commitbf92779f8a88fbc70762f635abded6515ecad784 (patch)
tree6b76c8a39fba32e70d135d4be1164202d1471728
parent5ec9a4860dc75678affe8546f7f55be1323c0e49 (diff)
downloadtuna-bf92779f8a88fbc70762f635abded6515ecad784.tar.gz
tuna: String exceptions are no longer allowed in python3
String exceptions are no longer allowed in python3, so raise a SyntaxError which was what was intended here anyway Signed-off-by: John Kacur <jkacur@redhat.com>
-rwxr-xr-xtuna/tuna.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tuna/tuna.py b/tuna/tuna.py
index 213bbf6..196bbbf 100755
--- a/tuna/tuna.py
+++ b/tuna/tuna.py
@@ -123,7 +123,7 @@ def cpustring_to_list(cpustr):
for field in fields:
ends = [ int(a, 0) for a in field.split("-") ]
if len(ends) > 2:
- raise "Syntax error"
+ raise SyntaxError("Syntax error")
if len(ends) == 2:
cpu_list += range(ends[0], ends[1] + 1)
else: