up command crashes from local file #4

Closed
opened 2022-01-27 19:54:28 +00:00 by isti · 1 comment

Using the up command when the url is a file:// url (e.g a list) crashes offpunk.

Traceback (most recent call last):
  File "/usr/lib/python3.10/cmd.py", line 214, in onecmd
    func = getattr(self, 'do_' + cmd)
AttributeError: 'GeminiClient' object has no attribute 'do_u'. Did you mean: 'do_up'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/offpunk", line 33, in <module>
    sys.exit(load_entry_point('offpunk==0.1', 'console_scripts', 'offpunk')())
  File "/usr/lib/python3.10/site-packages/offpunk.py", line 2574, in main
    gc.cmdloop()
  File "/usr/lib/python3.10/cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python3.10/cmd.py", line 216, in onecmd
    return self.default(line)
  File "/usr/lib/python3.10/site-packages/offpunk.py", line 1550, in default
    return self.onecmd(expanded)
  File "/usr/lib/python3.10/cmd.py", line 217, in onecmd
    return func(arg)
  File "/usr/lib/python3.10/site-packages/offpunk.py", line 716, in outer
    return inner(self, *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/offpunk.py", line 1755, in do_up
    self._go_to_gi(self.gi.up())
  File "/usr/lib/python3.10/site-packages/offpunk.py", line 658, in up
    return GeminiItem(self._derive_url(new_path))
  File "/usr/lib/python3.10/site-packages/offpunk.py", line 670, in _derive_url
    self.host if self.port == standard_ports[self.scheme] else self.host + ":" + str(self.port),
AttributeError: 'GeminiItem' object has no attribute 'port'
Using the up command when the url is a `file://` url (e.g a list) crashes offpunk. ``` Traceback (most recent call last): File "/usr/lib/python3.10/cmd.py", line 214, in onecmd func = getattr(self, 'do_' + cmd) AttributeError: 'GeminiClient' object has no attribute 'do_u'. Did you mean: 'do_up'? During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/offpunk", line 33, in <module> sys.exit(load_entry_point('offpunk==0.1', 'console_scripts', 'offpunk')()) File "/usr/lib/python3.10/site-packages/offpunk.py", line 2574, in main gc.cmdloop() File "/usr/lib/python3.10/cmd.py", line 138, in cmdloop stop = self.onecmd(line) File "/usr/lib/python3.10/cmd.py", line 216, in onecmd return self.default(line) File "/usr/lib/python3.10/site-packages/offpunk.py", line 1550, in default return self.onecmd(expanded) File "/usr/lib/python3.10/cmd.py", line 217, in onecmd return func(arg) File "/usr/lib/python3.10/site-packages/offpunk.py", line 716, in outer return inner(self, *args, **kwargs) File "/usr/lib/python3.10/site-packages/offpunk.py", line 1755, in do_up self._go_to_gi(self.gi.up()) File "/usr/lib/python3.10/site-packages/offpunk.py", line 658, in up return GeminiItem(self._derive_url(new_path)) File "/usr/lib/python3.10/site-packages/offpunk.py", line 670, in _derive_url self.host if self.port == standard_ports[self.scheme] else self.host + ":" + str(self.port), AttributeError: 'GeminiItem' object has no attribute 'port' ```
Owner

Good catch, thanks for the report.

Good catch, thanks for the report.
ploum closed this issue 2022-01-28 12:41:14 +00:00
ploum referenced this issue from a commit 2022-07-03 13:26:09 +00:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ploum/offpunk#4
No description provided.