[PackageKit-commit] packagekit: Branch 'master'
Richard Hughes
hughsient at kemper.freedesktop.org
Tue Sep 16 12:10:28 PDT 2008
python/packagekit/backend.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 51b020dca500141a6e78ab549765f09a34ac75fc
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Sep 16 19:07:39 2008 +0100
yum: hook up get-distro-upgrades in the dispatcher, and make sure we send a proper error in this case
diff --git a/python/packagekit/backend.py b/python/packagekit/backend.py
index 09fd1da..87abaa7 100644
--- a/python/packagekit/backend.py
+++ b/python/packagekit/backend.py
@@ -468,6 +468,9 @@ class PackageKitBaseBackend:
pkgs = args[0].split('|')
self.get_update_detail(pkgs)
self.finished();
+ elif cmd == 'get-distro-upgrades':
+ self.get_distro_upgrades()
+ self.finished();
elif cmd == 'get-updates':
filters = args[0]
self.get_updates(filters)
@@ -549,9 +552,9 @@ class PackageKitBaseBackend:
self.what_provides(filters,provides_type,search)
self.finished();
else:
- print "command [%s] is not known" % cmd
-
-
+ errmsg = "command '%s' is not known" % cmd
+ self.error(ERROR_INTERNAL_ERROR,errmsg,exit=False)
+ self.finished();
def exceptionHandler(typ,value,tb,base):
# Restore original exception handler
@@ -568,7 +571,6 @@ def exceptionHandler(typ,value,tb,base):
# send the traceback to PackageKit
base.error(ERROR_INTERNAL_ERROR,errmsg,exit=True)
-
def installExceptionHandler(base):
sys.excepthook = lambda typ,value,tb: exceptionHandler(typ,value,tb,base)
More information about the PackageKit-commit
mailing list