We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd996e3 commit e607c2eCopy full SHA for e607c2e
ledgertools/read.py
@@ -84,7 +84,7 @@ def _parse_header(self, string):
84
return None
85
86
def _parse_posting(self, string):
87
- parts = [p for p in string.split(' ') if p]
+ parts = [p.strip() for p in string.split(' ') if p]
88
89
account = parts[0]
90
try:
@@ -100,8 +100,12 @@ def _parse_posting(self, string):
100
# check for posting date
101
secondary_date = None
102
if 'date' in tags.keys():
103
- secondary_date = pendulum.parse(tags['date']).date()
104
- del tags['date']
+ try:
+ secondary_date = pendulum.parse(tags['date']).date()
105
+ del tags['date']
106
+ except:
107
+ print(parts)
108
+ raise
109
return dict(account=account,
110
amount=amount,
111
tags=tags,
0 commit comments