summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2005-07-20 14:15:08 +0000
committerJohn (J5) Palmieri <johnp@redhat.com>2005-07-20 14:15:08 +0000
commitde689235e938f0060ecad6fa0ce1933b700f6e71 (patch)
tree89f51e25d03986e0c2d94717455eff2b7970f0c9 /python
parent14acf6a2632e9d6ba2f93dca5c5a004744009f8d (diff)
downloaddbus-de689235e938f0060ecad6fa0ce1933b700f6e71.tar.gz
* 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 <anthony@interlink.com.au>)
Diffstat (limited to 'python')
-rw-r--r--python/_dbus.py3
-rw-r--r--python/_util.py1
-rw-r--r--python/decorators.py1
-rw-r--r--python/extract.py2
-rw-r--r--python/matchrules.py2
-rw-r--r--python/proxies.py3
-rw-r--r--python/service.py5
7 files changed, 7 insertions, 10 deletions
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