integerToHex wrongly converting negative integers

Project: 
Gurux.DLMS.Python

integerToHex method of _GXCommon.py is wrongly converting negative integers to hex. For instance, -4 should be converted to FC, however it is converting it to X4. This is happening due to str_ = hex(value)[2:] line, as hex(-4) is '-0x4'.

Status: 
Active
Priority: 
Normal
Category: 
Bug report
Component: 
Code
Reporter: 
zmiguel
Luotu: 
Ma, 06/17/2019 - 23:22
Päivitetty: 
Ma, 06/17/2019 - 23:22