Skip to content
Snippets Groups Projects
Commit 64481eee authored by Matt Mackall's avatar Matt Mackall
Browse files

hgext: fixup a couple missed file().read() instances

parent 524c560e
No related merge requests found
......@@ -27,7 +27,9 @@
if not os.path.exists(os.path.join(path, '_MTN')):
# Could be a monotone repository (SQLite db file)
try:
header = file(path, 'rb').read(16)
f = file(path, 'rb')
header = f.read(16)
f.close()
except:
header = ''
if header != 'SQLite format 3\x00':
......
......@@ -44,7 +44,7 @@
def _explain_watch_limit(ui, dirstate, rootabs):
path = '/proc/sys/fs/inotify/max_user_watches'
try:
limit = int(file(path).read())
limit = int(util.readfile(path))
except IOError, err:
if err.errno != errno.ENOENT:
raise
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment