mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-31 10:26:39 +01:00
BugFix: TypeError: must be encoded string without NULL bytes, not str #100
This commit is contained in:
parent
6cdb748d8f
commit
608a78d7f3
1 changed files with 4 additions and 1 deletions
|
@ -54,7 +54,7 @@ class PackageHealth(object):
|
||||||
not line.startswith("dev/") and
|
not line.startswith("dev/") and
|
||||||
not line.startswith("install/") and
|
not line.startswith("install/") and
|
||||||
"/incoming/" not in line):
|
"/incoming/" not in line):
|
||||||
if not os.path.isfile("/" + line):
|
if not os.path.isfile(r"/" + line):
|
||||||
self.cn += 1
|
self.cn += 1
|
||||||
print("Not installed: {0}/{1}{2} --> {3}".format(
|
print("Not installed: {0}/{1}{2} --> {3}".format(
|
||||||
self.meta.color["RED"], line, self.meta.color["ENDC"],
|
self.meta.color["RED"], line, self.meta.color["ENDC"],
|
||||||
|
@ -75,6 +75,9 @@ class PackageHealth(object):
|
||||||
self.lf = 0
|
self.lf = 0
|
||||||
with open(self.pkg_path + pkg, "r") as fopen:
|
with open(self.pkg_path + pkg, "r") as fopen:
|
||||||
for line in fopen:
|
for line in fopen:
|
||||||
|
if "\0" in line:
|
||||||
|
print("Null: {0}").format(line)
|
||||||
|
break
|
||||||
self.cf += 1 # count all files
|
self.cf += 1 # count all files
|
||||||
self.lf += 1 # count each package files
|
self.lf += 1 # count each package files
|
||||||
if self.lf > 19:
|
if self.lf > 19:
|
||||||
|
|
Loading…
Reference in a new issue