utils.debug: Format numbers as hex for qenum_key.

This commit is contained in:
Florian Bruhin 2014-08-07 14:41:07 +02:00
parent 5c50640a68
commit 318805a088

View File

@ -160,7 +160,7 @@ def qenum_key(base, value, add_base=False, klass=None):
ret = name
break
else:
ret = str(value)
ret = '0x{:04x}'.format(int(value))
if add_base and hasattr(base, '__name__'):
return '.'.join([base.__name__, ret])
else: