solving a crash when directly entering an unknown gopher address while offline
This commit is contained in:
parent
9a3013fa5c
commit
040f077836
|
@ -5,6 +5,7 @@
|
|||
- Default width set to 80 as many gopherhole and gemini capsule have it hardcoded
|
||||
- Streaming URL without valid content-length are now closed after 5Mo of download (thanks to Eoin Carney for reporting the issue)
|
||||
- Fixed a crash when the cache is already a dir inside a dir.
|
||||
- Fixed a crash when manually entering an unknown gopher URL while offline
|
||||
|
||||
## 1.2 - March 24th 2022
|
||||
Very experimental release:
|
||||
|
|
|
@ -672,7 +672,7 @@ class GemtextRenderer(AbstractRenderer):
|
|||
def get_title(self):
|
||||
if self.title:
|
||||
return self.title
|
||||
else:
|
||||
elif self.body:
|
||||
lines = self.body.splitlines()
|
||||
for line in lines:
|
||||
if line.startswith("#"):
|
||||
|
@ -689,6 +689,8 @@ class GemtextRenderer(AbstractRenderer):
|
|||
else:
|
||||
self.title = "Empty Page"
|
||||
return self.title
|
||||
else:
|
||||
return "Unknown Gopher Page"
|
||||
|
||||
#render_gemtext
|
||||
def render(self,gemtext, width=None,mode=None):
|
||||
|
@ -1471,8 +1473,8 @@ class GeminiItem():
|
|||
f.close()
|
||||
return body
|
||||
else:
|
||||
print("ERROR: NO CACHE for %s" %self._cache_path)
|
||||
return error
|
||||
#print("ERROR: NO CACHE for %s" %self._cache_path)
|
||||
return None
|
||||
|
||||
# This method is used to load once the list of links in a gi
|
||||
# Links can be followed, after a space, by a description/title
|
||||
|
|
Loading…
Reference in New Issue