Files
codezero/config/lib.py
Bahadir Balban fb1de576cb Fixed hexadecimal conversions where output has the most significant bit as 1
If hex converted had a 1 in the MSB, an L was appended to the number.
The conversion routine removes this.
2009-09-28 14:04:19 +03:00

10 lines
183 B
Python

#! /usr/bin/env python2.6
# -*- mode: python; coding: utf-8; -*-
#
def conv_hex(val):
hexval = hex(val)
if hexval[-1:] == 'L':
hexval = hexval[:-1]
return hexval