| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a2d8a51 commit 3d7eaf1
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -484,7 +484,8 @@ def _deserialize(self, stream): | |||
| 484 | 484 | buf = enc.strip() | |
| 485 | 485 | while buf: | |
| 486 | 486 | if buf[0:10] == b"encoding ": | |
| 487 | - self.encoding = buf[buf.find(' ') + 1:].decode('ascii') | ||
| 487 | + self.encoding = buf[buf.find(' ') + 1:].decode( | ||
| 488 | + self.encoding, 'ignore') | ||
| 488 | 489 | elif buf[0:7] == b"gpgsig ": | |
| 489 | 490 | sig = buf[buf.find(b' ') + 1:] + b"\n" | |
| 490 | 491 | is_next_header = False | |
@@ -498,7 +499,7 @@ def _deserialize(self, stream): | |||
| 498 | 499 | break | |
| 499 | 500 | sig += sigbuf[1:] | |
| 500 | 501 | # end read all signature | |
| 501 | - self.gpgsig = sig.rstrip(b"\n").decode('ascii') | ||
| 502 | + self.gpgsig = sig.rstrip(b"\n").decode(self.encoding, 'ignore') | ||
| 502 | 503 | if is_next_header: | |
| 503 | 504 | continue | |
| 504 | 505 | buf = readline().strip() | |
| Back | FazBrowse Home | New Git URL |
0 commit comments