
# HG changeset patch # User Zhengang Li <lizg@cn.ibm.com> # Date 1208928765 -28800 # Node ID 146fb6c00b996d9207962d35c2cb9dd54254abdd # Parent 111853e6d4122800167525049c1215df839ef65b [TEST] Fix revision int() parsing bug The int(os.getenv('CIM_REV')) will lead to an exception if the revision is None. Signed-off-by: Zhengang Li <lizg@cn.ibm.com> diff -r 111853e6d412 -r 146fb6c00b99 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Wed Apr 23 11:13:59 2008 +0800 +++ b/suites/libvirt-cim/main.py Wed Apr 23 13:32:45 2008 +0800 @@ -93,6 +93,10 @@ def get_version(virt, ip): changeset = inst[0]['Changeset'] except Exception: return '0', 'Unknown' + if revision is None: + revision = '0' + if changeset is None: + changeset = 'Unknown' return revision, changeset def main():