Merge lp:~dobey/aptdaemon/fix-imports into lp:aptdaemon

Proposed by dobey
Status: Merged
Merged at revision: 850
Proposed branch: lp:~dobey/aptdaemon/fix-imports
Merge into: lp:aptdaemon
Diff against target: 25 lines (+2/-2)
2 files modified
aptdaemon/client.py (+1/-1)
aptdaemon/debconf.py (+1/-1)
To merge this branch: bzr merge lp:~dobey/aptdaemon/fix-imports
Reviewer Review Type Date Requested Status
Aptdaemon Developers Pending
Review via email: mp+119014@code.launchpad.net

Commit message

Check that the item in sys.modules is not None before trying to import it

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
1=== modified file 'aptdaemon/client.py'
2--- aptdaemon/client.py 2012-07-12 14:08:43 +0000
3+++ aptdaemon/client.py 2012-08-09 19:00:27 +0000
4@@ -37,7 +37,7 @@
5 import dbus.mainloop.glib
6 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
7
8-if 'gobject' in sys.modules:
9+if 'gobject' in sys.modules and sys.modules['gobject'] is not None:
10 import gobject as GObject
11 else:
12 from gi.repository import GObject
13
14=== modified file 'aptdaemon/debconf.py'
15--- aptdaemon/debconf.py 2011-11-25 00:23:33 +0000
16+++ aptdaemon/debconf.py 2012-08-09 19:00:27 +0000
17@@ -35,7 +35,7 @@
18 import tempfile
19 import sys
20
21-if 'gi.repository' in sys.modules:
22+if 'gi.repository' in sys.modules and sys.modules['gi.repository'] is not None:
23 from gi.repository import GObject
24 else:
25 import gobject as GObject

Subscribers

People subscribed via source and target branches

to status/vote changes: