From eb93f2a19ee7cbbfd1771373d3e4039915f0a8a0 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 5 Nov 2008 20:00:18 +0000 Subject: [PATCH] [thorstenp] remove useless import --- src/common/dbus_support.py | 1 - src/disco.py | 4 ++-- src/notify.py | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/common/dbus_support.py b/src/common/dbus_support.py index dd741c597..77f965e1e 100644 --- a/src/common/dbus_support.py +++ b/src/common/dbus_support.py @@ -39,7 +39,6 @@ try: except ImportError: pass import dbus - import dbus.service import dbus.glib supported = True # does user have D-Bus bindings? except ImportError: diff --git a/src/disco.py b/src/disco.py index 5abc0818b..9dd135d3f 100644 --- a/src/disco.py +++ b/src/disco.py @@ -45,7 +45,7 @@ # There are more methods, of course, but this is a basic set. import os -import inspect +import types import weakref import gobject import gtk @@ -203,7 +203,7 @@ class Closure(object): self.userargs = userargs self.remove = remove self.removeargs = removeargs - if inspect.ismethod(cb): + if isinstance(cb, types.MethodType): self.meth_self = weakref.ref(cb.im_self, self._remove) self.meth_name = cb.func_name elif callable(cb): diff --git a/src/notify.py b/src/notify.py index 0d5a4bfb8..0d389039b 100644 --- a/src/notify.py +++ b/src/notify.py @@ -40,7 +40,6 @@ from common import dbus_support if dbus_support.supported: import dbus import dbus.glib - import dbus.service USER_HAS_PYNOTIFY = True # user has pynotify module