src/pyams_sequence/utility.py
changeset 13 b3d0c3b4c940
parent 10 aa2472483e00
child 16 84b57eb4db8c
equal deleted inserted replaced
12:7ffbf5c15128 13:b3d0c3b4c940
   129     def get_short_oid(self, oid, obj_prefix=None):
   129     def get_short_oid(self, oid, obj_prefix=None):
   130         return '{prefix}{obj_prefix} {hex_id:x}'.format(prefix=self.prefix or '',
   130         return '{prefix}{obj_prefix} {hex_id:x}'.format(prefix=self.prefix or '',
   131                                                         obj_prefix=obj_prefix or '',
   131                                                         obj_prefix=obj_prefix or '',
   132                                                         hex_id=oid)
   132                                                         hex_id=oid)
   133 
   133 
       
   134     def get_base_oid(self, oid, obj_prefix=None):
       
   135         return '{obj_prefix} {hex_id:x}'.format(obj_prefix=obj_prefix or '',
       
   136                                                 hex_id=oid)
       
   137 
   134     def get_internal_id(self, oid):
   138     def get_internal_id(self, oid):
   135         if oid.startswith('+'):
   139         if oid.startswith('+'):
   136             oid = oid[1:]
   140             oid = oid[1:]
   137         elif self.prefix and oid.startswith(self.prefix):
   141         elif self.prefix and oid.startswith(self.prefix):
   138             oid = oid[len(self.prefix):]
   142             oid = oid[len(self.prefix):]