smilner added a new comment to an issue you are following:
``
Python method version I'm testing:
```python
def get_ostree_version(self):
try:
g = guestfs.GuestFS(python_return_dict=True)
g.add_drive_opts(self._image_path, format="qcow2", readonly=0)
g.launch()
g.mount('/dev/atomicos/root', '/')
dir = g.ls('/ostree/deploy/fedora-atomic/deploy/')[0]
data = g.cat(
'/ostree/deploy/fedora-atomic/deploy/'
'{}/usr/lib/os.release.d/os-release-fedora'.format(dir))
version = re.findall("OSTREE_VERSION=(.*)", data)[0]
g.shutdown()
return version
except Exception as ex:
raise Exception(
'Unable to read ostree version: {}: {}'.format(type(ex), ex))
```
``
To reply, visit the link below or just reply to this email
https://pagure.io/atomic-wg/issue/411