solderpunk/VF-1

"up" after "bookmarks" causes "AttributeError" crash

Opened this issue · 0 comments

Going "up" after browsing your bookmarks causes vf1 to crash:

rak@zeta:~$ vf1 republic.circumlunar.space
Welcome to VF-1!
Enjoy your flight through Gopherspace...
Welcome to the Mare Serenitatis Circumlunar Corporate Republic
[ snip ]
VF-1> bookmarks
[1] 2019-11-19 johngodlee/
VF-1> up
ERROR: [Errno 21] Is a directory: '/home/rak'
Traceback (most recent call last):
  File "/home/rak/.local/lib/python3.7/site-packages/vf1.py", line 237, in _go_to_gi
    f = open(gi.path, "rb")
IsADirectoryError: [Errno 21] Is a directory: '/home/rak'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rak/.local/bin/vf1", line 10, in <module>
    sys.exit(main())
  File "/home/rak/.local/lib/python3.7/site-packages/vf1.py", line 1083, in main
    gc.cmdloop()
  File "/usr/lib/python3.7/cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python3.7/cmd.py", line 217, in onecmd
    return func(arg)
  File "/home/rak/.local/lib/python3.7/site-packages/vf1.py", line 179, in outer
    return inner(self, *args, **kwargs)
  File "/home/rak/.local/lib/python3.7/site-packages/vf1.py", line 634, in do_up
    self._go_to_gi(new_gi, update_hist=False)
  File "/home/rak/.local/lib/python3.7/site-packages/vf1.py", line 285, in _go_to_gi
    if (isinstance(err, (ssl.SSLError)) and err.reason == "UNKNOWN_PROTOCOL") or (isinstance(err, OSError) and err.reason == "WRONG_VERSION_NUMBER"):
AttributeError: 'IsADirectoryError' object has no attribute 'reason'