##// END OF EJS Templates
[PATCH] Fix use of util.CommandError...
[PATCH] Fix use of util.CommandError -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH] Fix use of util.CommandError From: Bryan O'Sullivan <bos@serpentine.com> Fix CommandError so error messages don't say "abort: abort: ...". manifest hash: 2aea4c8043d321882dcdf846a42a55403ce1086f -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCwvOZywK+sNU5EO8RAqF/AJ9IIr6JPPUc15tb7w4lnI7yMFxSmgCfQUYn OX7Uz7G3dJNRIjAxJtGwCLo= =xj/W -----END PGP SIGNATURE-----

File last commit:

r262:3db70014 default
r521:0fb8ade0 default
Show More
demandload.py
15 lines | 384 B | text/x-python | PythonLexer
def demandload(scope, modules):
class d:
def __getattr__(self, name):
mod = self.__dict__["mod"]
scope = self.__dict__["scope"]
scope[mod] = __import__(mod, scope, scope, [])
return getattr(scope[mod], name)
for m in modules.split():
dl = d()
dl.mod = m
dl.scope = scope
scope[m] = dl