diff options
| author | PMR <pmr@pmr-lander> | 2017-10-23 14:57:57 +0000 |
|---|---|---|
| committer | PMR <pmr@pmr-lander> | 2017-10-23 14:57:57 +0000 |
| commit | 2baca67319f7c1b926cf7503f319bba9383b35bf (patch) | |
| tree | 2033be95b8bf298e0158b1638a1d473c016173e7 | |
| parent | c9b075a3fc0772609e4d1a30d0ff3bf37d1a1e87 (diff) | |
| parent | 189179da14af222900ea01700700f86792c3bbda (diff) | |
Merge #332604 from ~fourdollars/plainbox-provider-checkbox:master
| -rwxr-xr-x | bin/recovery_info | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/recovery_info b/bin/recovery_info index 4aa03cb0..b2feedb0 100755 --- a/bin/recovery_info +++ b/bin/recovery_info @@ -246,7 +246,15 @@ class RecoveryVersion(Command): fname = "{}/bto.xml".format(mntdir) if os.path.isfile(fname): o = minidom.parse("{}/bto.xml".format(mntdir)) - bto_version = o.getElementsByTagName("iso")[0].firstChild.data + bto_platform = o.getElementsByTagName("platform") + bto_revision = o.getElementsByTagName("revision") + if bto_platform and bto_revision: + bto_platform = bto_platform[0].firstChild.data + bto_revision = bto_revision[0].firstChild.data + bto_version = bto_platform + " " + bto_revision + else: + bto_iso = o.getElementsByTagName("iso") + bto_version = bto_iso[0].firstChild.data print("bto_version: {}".format(bto_version)) |
