comparison hgext/inotify/linuxserver.py @ 14179:64481eee6215

hgext: fixup a couple missed file().read() instances
author Matt Mackall <mpm@selenic.com>
date Tue, 03 May 2011 21:53:13 -0500
parents 34cc8b84407f
children 9f98fe05ecf1
comparison
equal deleted inserted replaced
14178:524c560e2d32 14179:64481eee6215
42 return walkit('', True) 42 return walkit('', True)
43 43
44 def _explain_watch_limit(ui, dirstate, rootabs): 44 def _explain_watch_limit(ui, dirstate, rootabs):
45 path = '/proc/sys/fs/inotify/max_user_watches' 45 path = '/proc/sys/fs/inotify/max_user_watches'
46 try: 46 try:
47 limit = int(file(path).read()) 47 limit = int(util.readfile(path))
48 except IOError, err: 48 except IOError, err:
49 if err.errno != errno.ENOENT: 49 if err.errno != errno.ENOENT:
50 raise 50 raise
51 raise util.Abort(_('this system does not seem to ' 51 raise util.Abort(_('this system does not seem to '
52 'support inotify')) 52 'support inotify'))