Merge lp:~pitti/software-center/gi-fixes into lp:software-center

Proposed by Martin Pitt on 2011-08-19
Status: Merged
Merged at revision: 2136
Proposed branch: lp:~pitti/software-center/gi-fixes
Merge into: lp:software-center
Diff against target: 125 lines (+29/-6)
6 files modified
debian/changelog (+4/-0)
softwarecenter/backend/aptchannels.py (+6/-1)
softwarecenter/backend/aptd.py (+7/-1)
softwarecenter/backend/weblive.py (+5/-1)
softwarecenter/db/history_impl/apthistory.py (+1/-2)
softwarecenter/db/update.py (+6/-1)
To merge this branch: bzr merge lp:~pitti/software-center/gi-fixes
Reviewer Review Type Date Requested Status
Michael Vogt 2011-08-19 Pending
Review via email: mp+72152@code.launchpad.net

Description of the change

More gobject/GObject fixes.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2011-08-19 07:57:36 +0000
+++ debian/changelog 2011-08-19 08:26:37 +0000
@@ -26,6 +26,10 @@
26 - show channel selector on button-press-event instead of26 - show channel selector on button-press-event instead of
27 button-release-event for consistent menu behaviour (LP: #828317)27 button-release-event for consistent menu behaviour (LP: #828317)
2828
29 [ Martin Pitt ]
30 * Fix some more places which need to conditionally import gobject or
31 GObject. (LP: #829186)
32
29 -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 19 Aug 2011 09:38:46 +020033 -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 19 Aug 2011 09:38:46 +0200
3034
31software-center (4.1.16) oneiric; urgency=low35software-center (4.1.16) oneiric; urgency=low
3236
=== modified file 'softwarecenter/backend/aptchannels.py'
--- softwarecenter/backend/aptchannels.py 2011-08-05 15:32:20 +0000
+++ softwarecenter/backend/aptchannels.py 2011-08-19 08:26:37 +0000
@@ -18,9 +18,14 @@
18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1919
20import os20import os
21from gi.repository import GObject
22import logging21import logging
23import xapian22import xapian
23import sys
24
25if 'gobject' in sys.modules:
26 import gobject as GObject
27else:
28 from gi.repository import GObject
2429
25from aptsources.sourceslist import SourceEntry, SourcesList30from aptsources.sourceslist import SourceEntry, SourcesList
2631
2732
=== modified file 'softwarecenter/backend/aptd.py'
--- softwarecenter/backend/aptd.py 2011-08-17 09:11:49 +0000
+++ softwarecenter/backend/aptd.py 2011-08-19 08:26:37 +0000
@@ -18,10 +18,16 @@
1818
19import apt_pkg19import apt_pkg
20import dbus20import dbus
21from gi.repository import GObject
22import logging21import logging
23import os22import os
24import re23import re
24import sys
25
26if 'gobject' in sys.modules:
27 import gobject as GObject
28else:
29 from gi.repository import GObject
30
25from softwarecenter.utils import (sources_filename_from_ppa_entry,31from softwarecenter.utils import (sources_filename_from_ppa_entry,
26 release_filename_in_lists_from_deb_line,32 release_filename_in_lists_from_deb_line,
27 obfuscate_private_ppa_details,33 obfuscate_private_ppa_details,
2834
=== modified file 'softwarecenter/backend/weblive.py'
--- softwarecenter/backend/weblive.py 2011-08-09 08:47:43 +0000
+++ softwarecenter/backend/weblive.py 2011-08-19 08:26:37 +0000
@@ -22,13 +22,17 @@
22# and put into weblive_pristine.py22# and put into weblive_pristine.py
2323
24import re24import re
25from gi.repository import GObject
26import os25import os
27import random26import random
28import subprocess27import subprocess
29import string28import string
30import imp29import imp
30import sys
3131
32if 'gobject' in sys.modules:
33 import gobject as GObject
34else:
35 from gi.repository import GObject
32from threading import Thread, Event36from threading import Thread, Event
33from weblive_pristine import WebLive37from weblive_pristine import WebLive
34import softwarecenter.paths38import softwarecenter.paths
3539
=== modified file 'softwarecenter/db/history_impl/apthistory.py'
--- softwarecenter/db/history_impl/apthistory.py 2011-08-13 08:50:01 +0000
+++ softwarecenter/db/history_impl/apthistory.py 2011-08-19 08:26:37 +0000
@@ -17,8 +17,6 @@
17# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA17# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1818
1919
20from gi.repository import GObject
21
22import apt_pkg20import apt_pkg
23apt_pkg.init_config()21apt_pkg.init_config()
2422
@@ -27,6 +25,7 @@
27import gzip25import gzip
28import os.path26import os.path
29import logging27import logging
28import gobject as GObject
3029
31try:30try:
32 import cPickle as pickle31 import cPickle as pickle
3332
=== modified file 'softwarecenter/db/update.py'
--- softwarecenter/db/update.py 2011-08-18 16:36:07 +0000
+++ softwarecenter/db/update.py 2011-08-19 08:26:37 +0000
@@ -18,7 +18,6 @@
18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1919
20import base6420import base64
21from gi.repository import GObject
22import logging21import logging
23import os22import os
24import json23import json
@@ -26,6 +25,12 @@
26import shutil25import shutil
27import time26import time
28import xapian27import xapian
28import sys
29
30if 'gobject' in sys.modules:
31 import gobject as GObject
32else:
33 from gi.repository import GObject
2934
30# py3 compat35# py3 compat
31try:36try: