else:
self.soft_reboot (options)
-build_matcher=re.compile("\s*(?P<pid>[0-9]+).*-[bo]\s+(?P<buildname>[^\s]+)(\s|\Z)")
-build_matcher_initvm=re.compile("\s*(?P<pid>[0-9]+).*initvm.*\s+(?P<buildname>[^\s]+)\s*\Z")
+build_matcher=re.compile(r"\s*(?P<pid>[0-9]+).*-[bo]\s+(?P<buildname>[^\s]+)(\s|\Z)")
+build_matcher_initvm=re.compile(r"\s*(?P<pid>[0-9]+).*initvm.*\s+(?P<buildname>[^\s]+)\s*\Z")
class BuildLxcBox (BuildBox):
def soft_reboot (self, options):
self.run_ssh(['pkill','qemu'], "Killing qemu instances",
dry_run=options.dry_run)
- matcher=re.compile("\s*(?P<pid>[0-9]+).*-cdrom\s+(?P<nodename>[^\s]+)\.iso")
+ matcher=re.compile(r"\s*(?P<pid>[0-9]+).*-cdrom\s+(?P<nodename>[^\s]+)\.iso")
def sense(self, options):
print('qn', end=' ')
self.test_instances.append(i)
i.set_broken(plcindex, step)
- matcher_proc=re.compile (".*/proc/(?P<pid>[0-9]+)/cwd.*/root/(?P<buildname>[^/]+)$")
- matcher_grep=re.compile ("/root/(?P<buildname>[^/]+)/logs/trace.*:TRACE:\s*(?P<plcindex>[0-9]+).*step=(?P<step>\S+).*")
- matcher_grep_missing=re.compile ("grep: /root/(?P<buildname>[^/]+)/logs/trace: No such file or directory")
+ matcher_proc=re.compile(r".*/proc/(?P<pid>[0-9]+)/cwd.*/root/(?P<buildname>[^/]+)$")
+ matcher_grep=re.compile(r"/root/(?P<buildname>[^/]+)/logs/trace.*:TRACE:\s*(?P<plcindex>[0-9]+).*step=(?P<step>\S+).*")
+ matcher_grep_missing=re.compile(r"grep: /root/(?P<buildname>[^/]+)/logs/trace: No such file or directory")
def sense(self, options):
print('tm', end=' ')
return True
utils.header("********** Regular yum failed - special workaround in place, 2nd chance")
code, cached_rpm_path = \
- utils.output_of(self.actual_command_in_guest('find /var/cache/yum -name sfa-client\*.rpm'))
+ utils.output_of(self.actual_command_in_guest(r'find /var/cache/yum -name sfa-client\*.rpm'))
utils.header("rpm_path=<<{}>>".format(rpm_path))
# just for checking
self.run_in_guest("rpm -i {}".format(cached_rpm_path))
ip = sys.argv[3]
found = False
- lo_matcher = re.compile("\A(?P<left>.+)\s+-i\s+lo\s+-j\s+ACCEPT")
+ lo_matcher = re.compile(r"\A(?P<left>.+)\s+-i\s+lo\s+-j\s+ACCEPT")
# what comes out of iptables-save has short-options syntax
- ip_matcher = re.compile(".*-(s|d) %s" % ip)
+ ip_matcher = re.compile(r".*-(s|d) %s" % ip)
for line in fin.readlines():
attempt = lo_matcher.match(line)
if attempt: