summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorYaakov M. Nemoy <loupgaroublond@gmail.com>2008-10-02 19:22:51 -0400
committerYaakov M. Nemoy <loupgaroublond@gmail.com>2008-10-02 19:22:51 -0400
commitc5b35b0b3c5b15705d238563223c91381fb3cf8b (patch)
tree7cbe941ce19c2c4b9a78bb41da2d0558c85a376e /base
parent53bbc48597fa598a2c1a5ee780bda0efee679462 (diff)
downloadfedora-devshell-c5b35b0b3c5b15705d238563223c91381fb3cf8b.tar.gz
fedora-devshell-c5b35b0b3c5b15705d238563223c91381fb3cf8b.tar.xz
fedora-devshell-c5b35b0b3c5b15705d238563223c91381fb3cf8b.zip
Alters the parsing stage a bit to fix a bug.
We were deleting the paramaters at every step. This changes when that happens. Parsing language in a procedural language is hell.
Diffstat (limited to 'base')
-rw-r--r--base/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/base.py b/base/base.py
index afa0df4..836779b 100644
--- a/base/base.py
+++ b/base/base.py
@@ -127,6 +127,7 @@ def do_command(data, top=None):
params = []
module = None
+ params = []
while len(data):
if not top:
log.debug('not top')
@@ -137,7 +138,6 @@ def do_command(data, top=None):
log.error('%s is not a known module' % e.message)
return None, None, None
log.debug('mod is %s' % mod)
- params = []
while len(data):
log.debug('params so far %s' % params)
log.debug('inner loop %s' % data)
@@ -149,13 +149,13 @@ def do_command(data, top=None):
try:
top = module = load_module(mod, params)
mod_params = params
+ params = []
loaded_module = True
except ModuleError, e:
log.debug(e.reason)
break
else:
log.debug('is top')
- params = []
log.debug('params so far %s' % params)
param = data.popleft()
if hasattr(top, param):