Avoid Python 2.5 warning
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Sun, 20 Aug 2006 00:44:53 -0300
changeset 2960 61afc32c1a49
parent 2959 7f5fc4b347de
child 2961 5bb65c3945a3
Avoid Python 2.5 warning demandload.py:112: Warning: 'as' will become a reserved keyword in Python 2.6
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_)