oscar-cluster / oscar

OSCAR main source repository.
GNU General Public License v2.0
14 stars 3 forks source link

apitest: reg exp "[ERROR.*" crashes apitest. ("[" not supported in regexp) #661

Open dikim33 opened 7 years ago

dikim33 commented 7 years ago

Reported by olahaye74 on 7 Mar 2014 16:04 UTC

[apitest in the following way: Unhandled error in Deferred: Unhandled Error Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop self.runUntilCurrent() File "/usr/lib64/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent call.func(*call.args, **call.kw) File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 362, in callback self._startRunCallbacks(result) File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 458, in _startRunCallbacks self._runCallbacks() --- --- File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 545, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/usr/lib/python2.7/site-packages/libapitest/libapitest.py", line 698, in procReturned self.validate() File "/usr/lib/python2.7/site-packages/libapitest/libapitest.py", line 575, in validate rmatch = re.compile(self.expect[k](ERROR.*

Crashes)[1],re.M|re.S) File "/usr/lib64/python2.7/re.py", line 190, in compile return _compile(pattern, flags) File "/usr/lib64/python2.7/re.py", line 242, in _compile raise error, v # invalid expression sre_constants.error: unexpected end of regular expression

Need to CTRL-C to get back to shell prompt.

The problem is the "[" in the regexp. => Should not crash. => Should just print ERROR; invalid regexp and exit cleanly.

dikim33 commented 7 years ago

Modified by olahaye74 on 7 Mar 2014 16:04 UTC

dikim33 commented 7 years ago

Modified by olahaye74 on 7 Mar 2014 16:05 UTC