mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-17 06:11:35 +01:00
Fix removed summary
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
6562a3e28a
commit
f466586597
1 changed files with 4 additions and 3 deletions
|
@ -410,11 +410,12 @@ class PackageManager(object):
|
||||||
data = Utils().read_file(self.meta.pkg_path + package)
|
data = Utils().read_file(self.meta.pkg_path + package)
|
||||||
for line in data.splitlines():
|
for line in data.splitlines():
|
||||||
if line.startswith("UNCOMPRESSED PACKAGE SIZE:"):
|
if line.startswith("UNCOMPRESSED PACKAGE SIZE:"):
|
||||||
digit = re.sub("\D", "", line[26:])
|
digit = float((''.join(re.findall(
|
||||||
|
"[-+]?\d+[\.]?\d*[eE]?[-+]?\d*", line[26:]))))
|
||||||
if "M" in line[26:]:
|
if "M" in line[26:]:
|
||||||
self.size += float(digit) * 1024
|
self.size += digit * 1024
|
||||||
else:
|
else:
|
||||||
self.size += float(digit)
|
self.size += digit
|
||||||
break
|
break
|
||||||
|
|
||||||
def display(self):
|
def display(self):
|
||||||
|
|
Loading…
Reference in a new issue