pmbootstrap/pmb/helpers
Oliver Smith 8b8a73e8dd
Fix crash from mixing 'sudo' with 'du' output (!1777)
Do not crash during "pmbootstrap zap" and other actions when the user
needs to type in the sudo password before running "du" to calculate the
work folder size. We're trying to parse the "du" output as integer, but
of course the 'Sorry, try again' message from sudo is not a valid
integer.

$ pmbootstrap --details-to-stdout zap
(008707) [14:00:57] Shutdown complete
(008707) [14:00:57] Calculate work folder size
(008707) [14:00:57] % sudo du --summarize --block-size=1 /home/luca/.local/var/pmbootstrap
[sudo] password for luca:
[sudo] password for luca: Sorry, try again.

12966293504     /home/luca/.local/var/pmbootstrap
(008707) [14:01:03] ERROR: invalid literal for int() with base 10: 'Sorry, try again.\n12966293504'

It would be a good idea to separate the sudo output from the process
output in general, see #1677 for a related proposal.
2019-04-22 00:00:58 +02:00
..
__init__.py Update copyright to 2019 2019-01-02 09:31:20 +01:00
args.py Update copyright to 2019 2019-01-02 09:31:20 +01:00
cli.py Update copyright to 2019 2019-01-02 09:31:20 +01:00
devices.py Cosmetic: pmb.helpers.devices.list -> .list_codenames (!1740) 2019-01-09 08:11:33 +01:00
file.py Update copyright to 2019 2019-01-02 09:31:20 +01:00
frontend.py kconfig check: allow skip with !pmb:kconfigcheck (!1753) 2019-02-21 19:39:25 +01:00
git.py Update copyright to 2019 2019-01-02 09:31:20 +01:00
http.py Update copyright to 2019 2019-01-02 09:31:20 +01:00
logging.py Update copyright to 2019 2019-01-02 09:31:20 +01:00
mount.py Update copyright to 2019 2019-01-02 09:31:20 +01:00
other.py Fix crash from mixing 'sudo' with 'du' output (!1777) 2019-04-22 00:00:58 +02:00
package.py fixup! pmb.helpers.package.get: prefer right arch binary (!1776) 2019-04-21 23:22:49 +02:00
pkgrel_bump.py Update copyright to 2019 2019-01-02 09:31:20 +01:00
pmaports.py pmb.helpers.package.check_arch(): split (!1776) 2019-04-20 01:58:20 +02:00
repo.py repo.py: fix downloading too many APKINDEX files (!1764) 2019-03-02 16:28:39 +01:00
repo_missing.py repo_missing: return pkgnames, not subpkgnames (!1757) 2019-02-16 22:24:32 +01:00
run.py Update copyright to 2019 2019-01-02 09:31:20 +01:00
run_core.py Update copyright to 2019 2019-01-02 09:31:20 +01:00
ui.py Update copyright to 2019 2019-01-02 09:31:20 +01:00