summaryrefslogtreecommitdiff
path: root/ttystatus/fmt.py
diff options
context:
space:
mode:
Diffstat (limited to 'ttystatus/fmt.py')
-rw-r--r--ttystatus/fmt.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ttystatus/fmt.py b/ttystatus/fmt.py
index 16b69de..bc0bbe8 100644
--- a/ttystatus/fmt.py
+++ b/ttystatus/fmt.py
@@ -45,12 +45,12 @@ def parse(fmt):
while fmt:
m = pat.match(fmt)
if m:
- klass = getattr(ttystatus, m.group('class'))
- argnames = m.group('args').split(',')
- argnames = [x for x in argnames if x]
if prefix:
result.append(ttystatus.Literal(prefix))
prefix = ''
+ klass = getattr(ttystatus, m.group('class'))
+ argnames = m.group('args').split(',')
+ argnames = [x for x in argnames if x]
result.append(klass(*argnames))
fmt = fmt[m.end():]
elif fmt.startswith('%%'):