Commit 8bd808dc authored by Sebastien Robin's avatar Sebastien Robin

erp5testnode: fixed undefined variable and handle CalledProcessError

parent 9decb9ad
...@@ -36,6 +36,7 @@ import time ...@@ -36,6 +36,7 @@ import time
import shutil import shutil
import pkg_resources import pkg_resources
from ProcessManager import SubprocessError, ProcessManager, CancellationError from ProcessManager import SubprocessError, ProcessManager, CancellationError
from subprocess import CalledProcessError
from Updater import Updater from Updater import Updater
from erp5.util import taskdistribution from erp5.util import taskdistribution
...@@ -284,7 +285,7 @@ branch = %(branch)s ...@@ -284,7 +285,7 @@ branch = %(branch)s
process_manager.killPreviousRun() process_manager.killPreviousRun()
if test_result is not None: if test_result is not None:
try: try:
test_result.removeWatch(log_file_name) test_result.removeWatch(self.config['log_file'])
except KeyError: except KeyError:
log("KeyError, Watcher already deleted or not added correctly") log("KeyError, Watcher already deleted or not added correctly")
...@@ -357,7 +358,7 @@ branch = %(branch)s ...@@ -357,7 +358,7 @@ branch = %(branch)s
time.sleep(20) time.sleep(20)
self.runTestSuite(revision_dict,portal_url) self.runTestSuite(revision_dict,portal_url)
test_result.removeWatch(log_file_name) test_result.removeWatch(log_file_name)
except SubprocessError, e: except (SubprocessError, CalledProcessError) as e:
log("SubprocessError", exc_info=sys.exc_info()) log("SubprocessError", exc_info=sys.exc_info())
if test_result is not None: if test_result is not None:
test_result.removeWatch(log_file_name) test_result.removeWatch(log_file_name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment