r45918 - in /attic/system-config-printer/debian: changelog gpk-install-package-name
mitya57 at users.alioth.debian.org
mitya57 at users.alioth.debian.org
Thu Sep 17 10:31:01 UTC 2015
Author: mitya57
Date: Thu Sep 17 10:31:01 2015
New Revision: 45918
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=45918
Log:
* debian/gpk-install-package-name:
- Update to make it work with Python 3.
- Minor refactorings.
Modified:
attic/system-config-printer/debian/changelog
attic/system-config-printer/debian/gpk-install-package-name
Modified: attic/system-config-printer/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/attic/system-config-printer/debian/changelog?rev=45918&op=diff
==============================================================================
--- attic/system-config-printer/debian/changelog [utf-8] (original)
+++ attic/system-config-printer/debian/changelog [utf-8] Thu Sep 17 10:31:01 2015
@@ -15,6 +15,9 @@
- Remove trailing whitespace from package descriptions.
* Add 03_install_layout.patch to install cupshelpers Python module to
correct location (copied from Ubuntu).
+ * debian/gpk-install-package-name:
+ - Update to make it work with Python 3.
+ - Minor refactorings.
-- Dmitry Shachnev <mitya57 at debian.org> Wed, 16 Sep 2015 14:00:17 +0300
Modified: attic/system-config-printer/debian/gpk-install-package-name
URL: http://svn.debian.org/wsvn/pkg-gnome/attic/system-config-printer/debian/gpk-install-package-name?rev=45918&op=diff
==============================================================================
--- attic/system-config-printer/debian/gpk-install-package-name [utf-8] (original)
+++ attic/system-config-printer/debian/gpk-install-package-name [utf-8] Thu Sep 17 10:31:01 2015
@@ -1,4 +1,4 @@
-#!/usr/bin/python -u
+#!/usr/bin/python3 -u
# vim: set fileencoding=utf-8 :
#
# (C) 2010 Guido Guenther <agx at sigxcpu.org>
@@ -24,26 +24,25 @@
def main(argv):
pkgs = argv[1:]
if not pkgs:
- print >>sys.stderr, "no packages given"
- return 1
+ sys.exit("No packages given")
bus = dbus.SessionBus()
- pk = bus.get_object('org.freedesktop.PackageKit',
- '/org/freedesktop/PackageKit');
+ try:
+ pk = bus.get_object('org.freedesktop.PackageKit',
+ '/org/freedesktop/PackageKit')
+ except dbus.exceptions.DBusException as cause:
+ sys.exit(cause)
pk_iface = dbus.Interface(pk, dbus_interface='org.freedesktop.PackageKit.Modify')
try:
ret = pk_iface.InstallPackageNames(0, pkgs, "hide-finished,hide-warnings", timeout=300000)
if ret:
- print >>sys.stderr, "Error installing packages"
- return 1
- except dbus.exceptions.DBusException, cause:
- print sys.stderr, cause
- return 1
- return 0
+ sys.exit("Error installing packages")
+ except dbus.exceptions.DBusException as cause:
+ sys.exit(cause)
if __name__ == '__main__':
- sys.exit(main(sys.argv))
+ main(sys.argv)
# vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·:
More information about the pkg-gnome-commits
mailing list