##// END OF EJS Templates
hgext: fixup a couple missed file().read() instances
Matt Mackall -
r14179:64481eee default
parent child Browse files
Show More
@@ -27,7 +27,9 b' class monotone_source(converter_source, '
27 27 if not os.path.exists(os.path.join(path, '_MTN')):
28 28 # Could be a monotone repository (SQLite db file)
29 29 try:
30 header = file(path, 'rb').read(16)
30 f = file(path, 'rb')
31 header = f.read(16)
32 f.close()
31 33 except:
32 34 header = ''
33 35 if header != 'SQLite format 3\x00':
@@ -44,7 +44,7 b' def walkrepodirs(dirstate, absroot):'
44 44 def _explain_watch_limit(ui, dirstate, rootabs):
45 45 path = '/proc/sys/fs/inotify/max_user_watches'
46 46 try:
47 limit = int(file(path).read())
47 limit = int(util.readfile(path))
48 48 except IOError, err:
49 49 if err.errno != errno.ENOENT:
50 50 raise
General Comments 0
You need to be logged in to leave comments. Login now