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

Fix crash when $BROWSER is not set #60

Closed
wants to merge 7 commits into from

Conversation

mgedmin
Copy link
Contributor

@mgedmin mgedmin commented May 15, 2018

Fixes

Traceback (most recent call last):
  File "/home/mg/.venv/bin/urlscan", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/mg/src/urlscan/bin/urlscan", line 176, in <module>
    ui.main()
  File "/home/mg/src/urlscan/urlscan/urlchoose.py", line 97, in main
    loop.run()
  File "/home/mg/.venv/local/lib/python2.7/site-packages/urwid/main_loop.py", line 286, in run
    self._run()
  File "/home/mg/.venv/local/lib/python2.7/site-packages/urwid/main_loop.py", line 379, in _run
    return self._run_screen_event_loop()
  File "/home/mg/.venv/local/lib/python2.7/site-packages/urwid/main_loop.py", line 444, in _run_screen_event_loop
    keys = self.input_filter(keys, raw)
  File "/home/mg/.venv/local/lib/python2.7/site-packages/urwid/main_loop.py", line 547, in input_filter
    return self._input_filter(keys, raw)
  File "/home/mg/src/urlscan/urlscan/urlchoose.py", line 106, in handle_keys
    if os.environ['BROWSER'] not in ['elinks', 'links', 'w3m', 'lynx']:
  File "/home/mg/.venv/lib/python2.7/UserDict.py", line 40, in __getitem__
    raise KeyError(key)
KeyError: 'BROWSER'

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

Successfully merging this pull request may close these issues.

None yet

2 participants