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

corrupt cookies raise exception #95

Open
bkreider opened this issue Jan 30, 2020 · 0 comments
Open

corrupt cookies raise exception #95

bkreider opened this issue Jan 30, 2020 · 0 comments

Comments

@bkreider
Copy link
Contributor

I'm not sure how i ended up with a null cookie, but it cased problems with min(). If the cookie length is 0, we should just ignore the file (or even better remove it). Or if raising an exception, raise AEFatalError and handle gracefully and ask the user to remove it.

Traceback (most recent call last):
  File "/opt/anaconda/envs/ae5-tools/bin/ae5", line 10, in <module>
    sys.exit(main())
  File "/opt/anaconda/envs/ae5-tools/lib/python3.7/site-packages/ae5_tools/cli/main.py", line 132, in main
    cli(obj={})
  File "/opt/anaconda/envs/ae5-tools/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/opt/anaconda/envs/ae5-tools/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/opt/anaconda/envs/ae5-tools/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/anaconda/envs/ae5-tools/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/anaconda/envs/ae5-tools/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/anaconda/envs/ae5-tools/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/opt/anaconda/envs/ae5-tools/lib/python3.7/site-packages/ae5_tools/cli/commands/account.py", line 23, in list
    records = config.list()
  File "/opt/anaconda/envs/ae5-tools/lib/python3.7/site-packages/ae5_tools/config.py", line 102, in list
    expires = min(cookie.expires for cookie in cookies)
ValueError: min() arg is an empty sequence
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