Browse Source

Fixed cache.close() debian dependecy

bugfixes
gau1991 10 years ago
parent
commit
2eef5bc642
  1. 8
      ee/core/aptget.py

8
ee/core/aptget.py

@ -16,7 +16,6 @@ class EEAptGet():
fprogress = apt.progress.text.AcquireProgress() fprogress = apt.progress.text.AcquireProgress()
iprogress = apt.progress.base.InstallProgress() iprogress = apt.progress.base.InstallProgress()
cache.update() cache.update()
cache.close()
def upgrade(self, packages): def upgrade(self, packages):
"""Similar to apt-get update""" """Similar to apt-get update"""
@ -121,8 +120,6 @@ class EEAptGet():
print("package installation failed. [{err}]" print("package installation failed. [{err}]"
.format(err=str(e))) .format(err=str(e)))
return(False) return(False)
cache.close()
cache.close()
return(True) return(True)
def remove(self, packages, auto=False, purge=False): def remove(self, packages, auto=False, purge=False):
@ -222,9 +219,7 @@ class EEAptGet():
# app.log.error('Sorry, package installation failed ') # app.log.error('Sorry, package installation failed ')
print("Sorry, package installation failed [{err}]" print("Sorry, package installation failed [{err}]"
.format(err=str(e))) .format(err=str(e)))
cache.close()
return(False) return(False)
cache.close()
return(True) return(True)
def is_installed(self, package): def is_installed(self, package):
@ -241,13 +236,10 @@ class EEAptGet():
pkg = cache[package] pkg = cache[package]
# Check Package Installed # Check Package Installed
if pkg.is_installed: if pkg.is_installed:
cache.close()
return True return True
else: else:
cache.close()
return False return False
except KeyError as e: except KeyError as e:
Log.debug(self, "{0}".format(e)) Log.debug(self, "{0}".format(e))
except Exception as e: except Exception as e:
cache.close()
return False return False

Loading…
Cancel
Save