mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00
python: get version via API
This commit is contained in:
parent
c1a3652e59
commit
c7fd20e478
1 changed files with 6 additions and 1 deletions
|
@ -90,7 +90,12 @@ class Node(object):
|
||||||
return r.json()
|
return r.json()
|
||||||
|
|
||||||
def get_version(self):
|
def get_version(self):
|
||||||
ver = subprocess.check_output([ self.executable, '-V'], )
|
try:
|
||||||
|
resp = self.request('capabilities')
|
||||||
|
|
||||||
|
return resp['response']['build']
|
||||||
|
except Exception:
|
||||||
|
ver = subprocess.check_output([self.executable, '-V'], )
|
||||||
|
|
||||||
return ver.decode('ascii').rstrip()
|
return ver.decode('ascii').rstrip()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue