From de689235e938f0060ecad6fa0ce1933b700f6e71 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Wed, 20 Jul 2005 14:15:08 +0000 Subject: * python/_dbus.py, _util.py, decorators.py, extract.py, matchrules.py. proxies.py, service.py: Cleanup of code after running it through the pyflakes code checker mostly dealing with undefined names. (Bug #3828, Patch from Anthony Baxter ) --- ChangeLog | 7 +++++++ python/_dbus.py | 3 --- python/_util.py | 1 + python/decorators.py | 1 - python/extract.py | 2 -- python/matchrules.py | 2 +- python/proxies.py | 3 ++- python/service.py | 5 +++-- 8 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd816675..0158c1a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-07-20 John (J5) Palmieir + + * python/_dbus.py, _util.py, decorators.py, extract.py, matchrules.py. + proxies.py, service.py: Cleanup of code after running it through the + pyflakes code checker mostly dealing with undefined names. + (Bug #3828, Patch from Anthony Baxter ) + 2005-07-17 John (J5) Palmieri * NEWS: Update to 0.35.2 diff --git a/python/_dbus.py b/python/_dbus.py index 7bab5856..f0c7b069 100644 --- a/python/_dbus.py +++ b/python/_dbus.py @@ -48,9 +48,6 @@ from proxies import * from exceptions import * from matchrules import * -import re -import inspect - class Bus: """A connection to a DBus daemon. diff --git a/python/_util.py b/python/_util.py index 3f7061c3..c254178e 100644 --- a/python/_util.py +++ b/python/_util.py @@ -1,4 +1,5 @@ import re +from exceptions import ValidationException def _validate_interface_or_name(value): elements = value.split('.') diff --git a/python/decorators.py b/python/decorators.py index 2deec6d0..b94babc4 100644 --- a/python/decorators.py +++ b/python/decorators.py @@ -1,7 +1,6 @@ import _util import inspect import dbus_bindings -import new def method(dbus_interface): _util._validate_interface_or_name(dbus_interface) diff --git a/python/extract.py b/python/extract.py index f836edc7..3cdb9755 100644 --- a/python/extract.py +++ b/python/extract.py @@ -1,7 +1,5 @@ import commands -import glob import re -import os import string import sys diff --git a/python/matchrules.py b/python/matchrules.py index 9a7edb3e..d65e3920 100644 --- a/python/matchrules.py +++ b/python/matchrules.py @@ -1,4 +1,4 @@ -from exceptions import * +from exceptions import DBusException class SignalMatchNode: def __init__(self): diff --git a/python/proxies.py b/python/proxies.py index 688dd8ab..95c98a9c 100644 --- a/python/proxies.py +++ b/python/proxies.py @@ -1,4 +1,5 @@ import dbus_bindings +from exceptions import MissingReplyHandlerException, MissingErrorHandlerException class ProxyMethod: """A proxy Method. @@ -29,7 +30,7 @@ class ProxyMethod: if not(reply_handler and error_handler): if reply_handler: - raise MissingErrorself, HandlerException() + raise MissingErrorHandlerException() elif error_handler: raise MissingReplyHandlerException() diff --git a/python/service.py b/python/service.py index f6a1c7fd..edaef63f 100644 --- a/python/service.py +++ b/python/service.py @@ -1,6 +1,7 @@ -from decorators import * import dbus_bindings +import _dbus +from exceptions import UnknownMethodException class BusName: """A base class for exporting your own Named Services across the Bus @@ -10,7 +11,7 @@ class BusName: if bus == None: # Get the default bus - self._bus = Bus() + self._bus = _dbus.Bus() else: self._bus = bus -- cgit