Skip to content

Commit

Permalink
Handle negative inputs #26
Browse files Browse the repository at this point in the history
  • Loading branch information
deanishe committed Dec 27, 2017
1 parent d9c4428 commit cd719fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Binary file not shown.
4 changes: 3 additions & 1 deletion src/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,12 @@ def parse_quantity(self, query):
"""
qty = []
qtychars = ('1234567890' + self.thousands_separator +
qtychars = ('+-1234567890' + self.thousands_separator +
self.decimal_separator)
for c in query:
if c in qtychars:
if c == '+':
qty.append('')
if c == self.thousands_separator:
log.debug('ignored thousands separator "%s"', c)
# Append an empty string so qty length is correct
Expand Down
2 changes: 1 addition & 1 deletion src/info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ UPDATE_INTERVAL is the number of minutes between exchange rate updates.</string>
<string>APP_KEY</string>
</array>
<key>version</key>
<string>3.3.1</string>
<string>3.4</string>
<key>webaddress</key>
<string></string>
</dict>
Expand Down

0 comments on commit cd719fb

Please # to comment.