equal
deleted
inserted
replaced
42 raise RuntimeError("Unable to determine version: %s" % err) |
42 raise RuntimeError("Unable to determine version: %s" % err) |
43 |
43 |
44 |
44 |
45 def get_os_version(): |
45 def get_os_version(): |
46 try: |
46 try: |
47 output = DockerSupportCmd(['/usr/bin/pkg', 'info', 'entire']).run() |
47 output = DockerSupportCmd(['/usr/bin/pkg', 'info', '-r', |
|
48 'osnet/osnet-incorporation']).run() |
48 for line in map(str.strip, output.splitlines()): |
49 for line in map(str.strip, output.splitlines()): |
49 if line.startswith("Branch"): |
50 if line.startswith("Branch"): |
50 return line.split(":")[1].strip() |
51 return line.split(":")[1].strip() |
51 except Exception as err: |
52 except Exception as err: |
52 raise RuntimeError("Unable to determine version: %s" % err) |
53 raise RuntimeError("Unable to determine version: %s" % err) |