[ovs-dev] [python3 09/15] ovs.ovsuuid: Fix UUID.cInitUUID invocation of re.match with too few params.

Ben Pfaff blp at nicira.com
Thu Aug 25 00:15:07 UTC 2011


Found by pychecker.
---
 python/ovs/ovsuuid.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/python/ovs/ovsuuid.py b/python/ovs/ovsuuid.py
index 8a76d3a..5d2785c 100644
--- a/python/ovs/ovsuuid.py
+++ b/python/ovs/ovsuuid.py
@@ -66,7 +66,7 @@ class UUID(uuid.UUID):
         return ["uuid", str(self)]
 
     def cInitUUID(self, var):
-        m = re.match(str(self))
+        m = UUID.uuidRE.match(str(self))
         return ["%s.parts[0] = 0x%s;" % (var, m.group(1)),
                 "%s.parts[1] = 0x%s%s;" % (var, m.group(2), m.group(3)),
                 "%s.parts[2] = 0x%s%s;" % (var, m.group(4), m.group(5)),
-- 
1.7.4.4




More information about the dev mailing list