Commit 551b93c5 by Maciej Delmanowski

Made re.search string shorter

parent 40b0471e
......@@ -1901,7 +1901,7 @@ class LinuxVirtual(Virtual):
if os.path.exists('/proc/1/cgroup'):
for line in open('/proc/1/cgroup').readlines():
if re.search('/lxc/.*$', line):
if re.search('/lxc/', line):
self.facts['virtualization_type'] = 'lxc'
self.facts['virtualization_role'] = 'guest'
return
......
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