Force OID lowercase when searching for internal references
authorThierry Florac <tflorac@ulthar.net>
Fri, 14 Dec 2018 15:45:30 +0100
changeset 81 a9d254d5ff81
parent 80 71f3879cd592
child 82 4aa6d94aed43
Force OID lowercase when searching for internal references
src/pyams_sequence/utility.py
--- a/src/pyams_sequence/utility.py	Fri Nov 16 15:22:51 2018 +0100
+++ b/src/pyams_sequence/utility.py	Fri Dec 14 15:45:30 2018 +0100
@@ -67,13 +67,13 @@
 
     def get_full_oid(self, oid, obj_prefix=None):
         if oid.startswith('+'):
-            oid = oid[1:]
+            oid = oid[1:].lower()
         elif self.prefix and oid.startswith(self.prefix):
             return oid
         return '{prefix}{obj_prefix}{zeros}{hex_id}'.format(prefix=self.prefix or '',
                                                             obj_prefix=obj_prefix or '',
                                                             zeros='0' * (self.hex_oid_length - len(oid)),
-                                                            hex_id=oid or 0)
+                                                            hex_id=oid.lower() if oid else 0)
 
     def get_short_oid(self, oid, obj_prefix=None):
         return '{prefix}{obj_prefix} {hex_id:x}'.format(prefix=self.prefix or '',