# HG changeset patch # User Alexis S. L. Carvalho # Date 2006-08-20 03:44:53 # Node ID 61afc32c1a495588442d3c810f3ab6eac15c4778 # Parent 7f5fc4b347de86cc8bafa8e7c02f49b238ab3da6 Avoid Python 2.5 warning demandload.py:112: Warning: 'as' will become a reserved keyword in Python 2.6 diff --git a/mercurial/demandload.py b/mercurial/demandload.py --- a/mercurial/demandload.py +++ b/mercurial/demandload.py @@ -109,9 +109,9 @@ def demandload(scope, modules): mod = mod[:col] else: fromlist = [] - as = None + as_ = None if '@' in mod: - mod, as = mod.split("@") + mod, as_ = mod.split("@") importer = _importer(scope, mod, fromlist) if fromlist: for name in fromlist: @@ -130,6 +130,6 @@ def demandload(scope, modules): continue else: basemod = mod - if not as: - as = basemod - scope[as] = _replacer(importer, as) + if not as_: + as_ = basemod + scope[as_] = _replacer(importer, as_)