prompt for missing packages and exit

This commit is contained in:
j 2016-01-07 15:54:09 +05:30
parent 529a01269d
commit ca301546f3

10
install
View file

@ -64,11 +64,15 @@ class Install(Thread):
dnf_packages += ' poppler-utils' dnf_packages += ' poppler-utils'
if has_bin('apt-get') and apt_packages: if has_bin('apt-get') and apt_packages:
print('Installing additional packages: %s' % apt_packages) print('You need additional packages: %s' % apt_packages)
os.system('sudo apt-get install -y ' + apt_packages) print('sudo apt-get install -y ' + apt_packages)
self.failed = True
return
elif has_bin('dnf') and dnf_packages: elif has_bin('dnf') and dnf_packages:
print('Installing additional packages: %s' % dnf_packages) print('Installing additional packages: %s' % dnf_packages)
os.system('sudo dnf install -y ' + dnf_packages) print('sudo dnf install -y ' + dnf_packages)
self.failed = True
return
elif apt_packages: elif apt_packages:
print('You need to install Pillow, lxml and pyOpenSSL\ni.e. sudo pip3 install pillow lxml pyOpenSSL') print('You need to install Pillow, lxml and pyOpenSSL\ni.e. sudo pip3 install pillow lxml pyOpenSSL')
if 'poppler' in apt_packages: if 'poppler' in apt_packages: