Commit 6358dbc2 authored by Guido Trotter's avatar Guido Trotter
Browse files

jstore._ReadNumericFile: use utils.ReadFile


Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent a71f9c7d
......@@ -36,17 +36,12 @@ def _ReadNumericFile(file_name):
"""
try:
fd = open(file_name, "r")
except IOError, err:
return int(utils.ReadFile(file_name))
except EnvironmentError, err:
if err.errno in (errno.ENOENT, ):
return None
raise
try:
return int(fd.read(128))
finally:
fd.close()
def ReadSerial():
"""Read the serial file.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment