Rack awareness #12

Merged
Solvik merged 3 commits from feature/rack_awareness into master 2019-08-05 17:09:10 +02:00
2 changed files with 0 additions and 19 deletions
Showing only changes of commit 42b81a1f78 - Show all commits

View file

@ -1,10 +0,0 @@
import re
import subprocess
def get(value, regex):
output = subprocess.getoutput(value)
r = re.search(regex, output)
if r and len(r.groups()) > 0:
return r.groups()[0]
return None

View file

@ -1,9 +0,0 @@
import re
def get(value, regex):
for line in open(value, 'r'):
r = re.search(regex, line)
if r and len(r.groups()) > 0:
return r.groups()[0]
return None