comparison mercurial/demandimport.py @ 5155:f4f2baf7dc8a

demandimport: ignore pwd and grp. Both are unavailable under Windows and tarfile detects them via ImportError.
author Patrick Mezard <pmezard@gmail.com>
date Mon, 13 Aug 2007 19:42:52 +0200
parents 63b9d2deed48
children 0bbd86b847dd
comparison
equal deleted inserted replaced
5149:ad6b97132b81 5155:f4f2baf7dc8a
106 # set requested submodules for demand load 106 # set requested submodules for demand load
107 if not(hasattr(mod, x)): 107 if not(hasattr(mod, x)):
108 setattr(mod, x, _demandmod(x, mod.__dict__, locals)) 108 setattr(mod, x, _demandmod(x, mod.__dict__, locals))
109 return mod 109 return mod
110 110
111 ignore = ['_hashlib', '_xmlplus', 'fcntl', 'win32com.gen_py'] 111 ignore = ['_hashlib', '_xmlplus', 'fcntl', 'win32com.gen_py', 'pwd', 'grp']
112 112
113 def enable(): 113 def enable():
114 "enable global demand-loading of modules" 114 "enable global demand-loading of modules"
115 __builtins__["__import__"] = _demandimport 115 __builtins__["__import__"] = _demandimport
116 116