2019-08-04 01:11:53 +02:00
|
|
|
import re
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
|
|
|
|
def get(value, regex):
|
|
|
|
output = subprocess.getoutput(value)
|
|
|
|
r = re.search(regex, output)
|
2019-08-04 19:51:36 +02:00
|
|
|
if r and len(r.groups()) > 0:
|
|
|
|
return r.groups()[0]
|
2019-08-04 01:11:53 +02:00
|
|
|
return None
|