Permalink
Browse files

Prettified the hex conversion (related to previous bugfix). "%x"%addr…

… does not produce 0x nor L and the if/else is avoided.
  • Loading branch information...
1 parent 6bd6739 commit 8b61d1e7c09dafb647661336bfc0e420c87bb37f @rvalles committed Jun 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 brntool.py
View
@@ -24,7 +24,7 @@ def memreadblock(ser,addr,size):
ser.write('r')
while not (ser.read(1)=='0' and ser.read(1)=='x'):
pass
- ser.write(hex(addr)[2:-1 if addr.__class__ == long else len(hex(addr))])
+ ser.write("%x"%addr)
ser.write('\r')
while not (ser.read(1)=='.' and ser.read(1)=='.' and ser.read(1)=='.'):
pass

0 comments on commit 8b61d1e

Please sign in to comment.