package: Better error handling

This commit is contained in:
Sunil Mohan Adapa 2016-02-13 12:36:51 +05:30
parent 1f5fa31e53
commit 55cabdaa2e
No known key found for this signature in database
GPG Key ID: 36C361440C9BC971

View File

@ -88,7 +88,7 @@ class Transaction(object):
try:
self._do_install()
except glib.Error as exception:
raise PackageException(exception.message)
raise PackageException(exception.message) from exception
def _do_install(self):
"""Run a PackageKit transaction to install given packages.