[Libvirt-cim] [PATCH] [TEST] Fix CIM_REV to handle non integer strings
Deepti B Kalakeri
deeptik at linux.vnet.ibm.com
Wed Jun 4 06:35:37 UTC 2008
Kaitlin Rupert wrote:
> # HG changeset patch
> # User Kaitlin Rupert <karupert at us.ibm.com>
> # Date 1212165521 25200
> # Node ID 7e4310cd6913605148b038b46d244ed670730727
> # Parent 4a5a44d7b857df543af24d59380cb8fdbbb753a4
> [TEST] Fix CIM_REV to handle non integer strings.
>
> When working with patches, the changeset revision has a + appended to it.
>
> Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>
>
> diff -r 4a5a44d7b857 -r 7e4310cd6913 suites/libvirt-cim/lib/XenKvmLib/const.py
> --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Fri May 30 14:26:38 2008 +0800
> +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Fri May 30 09:38:41 2008 -0700
> @@ -26,7 +26,11 @@
> global CIM_REV
> global CIM_SET
>
> -CIM_REV = int(os.getenv("CIM_REV"))
> +rev = os.getenv("CIM_REV").strip("+")
> +if rev.isalnum():
>
Are we planning to use alphabets in the REV string, if yes then the I
say +1 for the changes.
If the REV string does not contain alphabets then we can use isdigit()
instead.
Thanks and Regards,
Deepti.
> + CIM_REV = int(rev)
> +else:
> + CIM_REV = 0
> CIM_SET = os.getenv("CIM_SET")
>
> if not CIM_REV or not CIM_SET:
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
>
More information about the Libvirt-cim
mailing list