Skip to content

Commit 20fee97

Browse files
committed
Updated hg rev read function
1 parent bcb87ed commit 20fee97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mbed/mbed.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,9 @@ def geturl():
574574

575575
def getrev():
576576
if os.path.isfile(os.path.join('.hg', 'dirstate')):
577+
from io import open
577578
with open(os.path.join('.hg', 'dirstate'), 'rb') as f:
578-
return ''.join('%02x'%ord(i) for i in f.read(6))
579+
return "".join('{:02x}'.format(x) for x in bytearray(f.read(6)))
579580
else:
580581
return ""
581582

0 commit comments

Comments
 (0)