Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent crashing with malformed date #18

Open
nibrahim opened this issue Jul 6, 2017 · 0 comments
Open

Prevent crashing with malformed date #18

nibrahim opened this issue Jul 6, 2017 · 0 comments

Comments

@nibrahim
Copy link
Contributor

nibrahim commented Jul 6, 2017

% invoice invoice ls --from=01/04/2017
Traceback (most recent call last):
File "/home/noufal/projects/python/environments/invoices/bin/invoice", line 9, in
load_entry_point('invoice==0.1.1a0', 'console_scripts', 'invoice')()
File "/home/noufal/projects/python/environments/invoices/lib/python3.4/site-packages/invoice-0.1.1a0-py3.4.egg/invoice/invoice.py", line 305, in main
dispatch(args)
File "/home/noufal/projects/python/environments/invoices/lib/python3.4/site-packages/invoice-0.1.1a0-py3.4.egg/invoice/invoice.py", line 295, in dispatch
command_handler()
File "/home/noufal/projects/python/environments/invoices/lib/python3.4/site-packages/invoice-0.1.1a0-py3.4.egg/invoice/commands.py", line 58, in call
return sc_handler()
File "/home/noufal/projects/python/environments/invoices/lib/python3.4/site-packages/invoice-0.1.1a0-py3.4.egg/invoice/commands.py", line 499, in list
from_ = None if self.args['from'] == 'a' else datetime.datetime.strptime(self.args['from'], "%d/%b/%Y")
File "/usr/lib/python3.4/_strptime.py", line 500, in _strptime_datetime
tt, fraction = _strptime(data_string, format)
File "/usr/lib/python3.4/_strptime.py", line 337, in _strptime
(data_string, format))
ValueError: time data '01/04/2017' does not match format '%d/%b/%Y'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant