summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-09-24 05:33:12 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-09-24 05:33:12 -0400
commit2f16a8213264a9428b31228373a5aae7605f5575 (patch)
tree311a9bf3a6346a4652baad28d344e2285f2be8e9 /main.py
parentc5d519447e913fe2320f39d8a57e320c3c0b6e41 (diff)
downloadfork-ledger-2f16a8213264a9428b31228373a5aae7605f5575.tar.gz
fork-ledger-2f16a8213264a9428b31228373a5aae7605f5575.tar.bz2
fork-ledger-2f16a8213264a9428b31228373a5aae7605f5575.zip
fixed an obscure "print" bug
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/main.py b/main.py
index 0b400f14..1f7157a8 100755
--- a/main.py
+++ b/main.py
@@ -262,11 +262,18 @@ if config.predicate:
# simple walk in C++, using `walk_entries'.
if 1:
- walk_entries (journal, handler)
+ if command == "e":
+ walk_transactions (new_entry, handler)
+ else:
+ walk_entries (journal, handler)
else:
- for entry in journal:
- for xact in entry:
+ if command == "e":
+ for xact in new_entry:
handler (xact)
+ else:
+ for entry in journal:
+ for xact in entry:
+ handler (xact)
# Flush the handlers, causing them to output whatever data is still
# pending.