Fix exceptions not to be strings
Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1157 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/server_job.py b/server/server_job.py
index 0170d33..eaf4e3d 100755
--- a/server/server_job.py
+++ b/server/server_job.py
@@ -316,16 +316,16 @@
if subdir:
if re.match(r'[\n\t]', subdir):
- raise "Invalid character in subdir string"
+ raise ValueError('Invalid character in subdir string')
substr = subdir
else:
substr = '----'
if not re.match(r'(START|(END )?(GOOD|WARN|FAIL|ABORT))$', \
status_code):
- raise "Invalid status code supplied: %s" % status_code
+ raise ValueError('Invalid status code supplied: %s' % status_code)
if re.match(r'[\n\t]', operation):
- raise "Invalid character in operation string"
+ raise ValueError('Invalid character in operation string')
operation = operation.rstrip()
status = status.rstrip()
status = re.sub(r"\t", " ", status)