diff --git a/src/calibre/debug.py b/src/calibre/debug.py index 03d35f2e78..f2c04c0b89 100644 --- a/src/calibre/debug.py +++ b/src/calibre/debug.py @@ -147,8 +147,10 @@ def print_basic_debug_info(out=None): if out is None: out = sys.stdout out = functools.partial(prints, file=out) import platform - from calibre.constants import __appname__, get_version, isportable, isosx - out(__appname__, get_version(), 'Portable' if isportable else '') + from calibre.constants import (__appname__, get_version, isportable, isosx, + isfrozen) + out(__appname__, get_version(), 'Portable' if isportable else '', + 'isfrozen:', isfrozen) out(platform.platform(), platform.system()) out(platform.system_alias(platform.system(), platform.release(), platform.version())) diff --git a/src/calibre/devices/udisks.py b/src/calibre/devices/udisks.py index 7a536f59eb..b9ab4be498 100644 --- a/src/calibre/devices/udisks.py +++ b/src/calibre/devices/udisks.py @@ -5,7 +5,7 @@ __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' -import os, dbus, re +import os, re def node_mountpoint(node): @@ -25,6 +25,7 @@ class NoUDisks1(Exception): class UDisks(object): def __init__(self): + import dbus self.bus = dbus.SystemBus() try: self.main = dbus.Interface(self.bus.get_object('org.freedesktop.UDisks', @@ -35,6 +36,7 @@ class UDisks(object): raise def device(self, device_node_path): + import dbus devpath = self.main.FindDeviceByDeviceFile(device_node_path) return dbus.Interface(self.bus.get_object('org.freedesktop.UDisks', devpath), 'org.freedesktop.UDisks.Device') @@ -73,6 +75,7 @@ class UDisks2(object): DRIVE = 'org.freedesktop.UDisks2.Drive' def __init__(self): + import dbus self.bus = dbus.SystemBus() try: self.bus.get_object('org.freedesktop.UDisks2',