Fail reading package-infos with unexpected encodings
Bug #1780454 reported by
ankostis
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pkginfo |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Since the `PKG-INFO` file etc frequently contain the full README.rst,
it happens that strange characters are contained.
Unfortunately, packaging-tools do not check encoding-validity of chars.
So it is unpleasent when later `pkginfo` cannot extract metadata.
Roughlt the following (hand-made) patch would suffice:
```diff
--- a/pkginfo/
+++ b/pkginfo/
@@ -0,2 +0,3 @@
+import io
import os
import sys
@@ -41,3 +41,3 @@
if os.path.
- with open(path) as f:
+ with io.open(path, errors='ignore') as f:
```
Respective fixes needed in all other modules (e.g. `pkginfo.
Changed in pkginfo: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Via https:/ /bazaar. launchpad. net/~tseaver/ pkginfo/ trunk/revision/ 155