summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Likins <alikins@redhat.com>2007-09-24 15:22:16 -0400
committerAdrian Likins <alikins@redhat.com>2007-09-24 15:22:16 -0400
commit9c72cbd826528bb64267ba2184ae16099343c7ab (patch)
treeef33f4ac253ebd1c9c1deb8618d6ac6a405b1c4d
parentbcbdab56d02a09ecda8a70acd6e5990073dd6b3e (diff)
downloadthird_party-func-9c72cbd826528bb64267ba2184ae16099343c7ab.tar.gz
third_party-func-9c72cbd826528bb64267ba2184ae16099343c7ab.tar.xz
third_party-func-9c72cbd826528bb64267ba2184ae16099343c7ab.zip
pyflakes cleanups
mostly just removing unused modules change "from codes import *" to "import codes" in a couple places and updated accordingly
-rwxr-xr-xmodules/func_module.py8
-rwxr-xr-xmodules/hardware.py1
-rwxr-xr-xmodules/process.py1
-rwxr-xr-xmodules/service.py5
-rwxr-xr-xmodules/smart.py1
-rwxr-xr-xmodules/test.py1
-rwxr-xr-xserver/codes.py3
-rwxr-xr-xserver/config_data.py4
-rwxr-xr-xserver/module_loader.py3
-rwxr-xr-xserver/server.py1
10 files changed, 7 insertions, 21 deletions
diff --git a/modules/func_module.py b/modules/func_module.py
index 7019bc5..a3a8550 100755
--- a/modules/func_module.py
+++ b/modules/func_module.py
@@ -12,18 +12,14 @@
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
-from codes import *
from server import config_data
from server import logger
-import os
-import threading
-import time
-import traceback
-
class FuncModule(object):
+
+ # the version is meant to
version = "0.0.0"
api_version = "0.0.0"
description = "No Description provided"
diff --git a/modules/hardware.py b/modules/hardware.py
index 2c41b9f..7c6deb4 100755
--- a/modules/hardware.py
+++ b/modules/hardware.py
@@ -23,7 +23,6 @@ sys.path.append("/usr/share/smolt/client")
import smolt
# our modules
-from codes import *
from modules import func_module
# =================================
diff --git a/modules/process.py b/modules/process.py
index 3e40fe1..1accbf5 100755
--- a/modules/process.py
+++ b/modules/process.py
@@ -18,7 +18,6 @@
import sub_process
# our modules
-from codes import *
from modules import func_module
# =================================
diff --git a/modules/service.py b/modules/service.py
index 524cd7b..433d70b 100755
--- a/modules/service.py
+++ b/modules/service.py
@@ -14,8 +14,7 @@
##
##
-
-from codes import *
+import codes
from modules import func_module
import sub_process
@@ -39,7 +38,7 @@ class Service(func_module.FuncModule):
if os.path.exists(filename):
return sub_process.call(["/sbin/service", service_name, command])
else:
- raise FuncException("Service not installed: %s" % service_name)
+ raise codes.FuncException("Service not installed: %s" % service_name)
def start(self, service_name):
return self.__command(service_name, "start")
diff --git a/modules/smart.py b/modules/smart.py
index 4ed8335..0a7be47 100755
--- a/modules/smart.py
+++ b/modules/smart.py
@@ -19,7 +19,6 @@
import sub_process
# our modules
-from codes import *
from modules import func_module
# =================================
diff --git a/modules/test.py b/modules/test.py
index ea22007..55265a3 100755
--- a/modules/test.py
+++ b/modules/test.py
@@ -1,6 +1,5 @@
#!/usr/bin/python
-from codes import *
from modules import func_module
class Test(func_module.FuncModule):
diff --git a/server/codes.py b/server/codes.py
index dc0ceac..c549709 100755
--- a/server/codes.py
+++ b/server/codes.py
@@ -14,9 +14,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
"""
import exceptions
-import string
-import sys
-import traceback
class FuncException(exceptions.Exception):
diff --git a/server/config_data.py b/server/config_data.py
index 7ace8ca..ed12383 100755
--- a/server/config_data.py
+++ b/server/config_data.py
@@ -12,8 +12,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+import codes
-from codes import *
import os
import ConfigParser
@@ -35,7 +35,7 @@ class Config:
def read(self):
if not os.path.exists(CONFIG_FILE):
- raise FuncException("Missing %s" % CONFIG_FILE)
+ raise codes.FuncException("Missing %s" % CONFIG_FILE)
cp = ConfigParser.ConfigParser()
diff --git a/server/module_loader.py b/server/module_loader.py
index a2a00c5..6fb69f7 100755
--- a/server/module_loader.py
+++ b/server/module_loader.py
@@ -18,8 +18,7 @@
import distutils.sysconfig
import os
import sys
-import glob
-from rhpl.translate import _, N_, textdomain, utf8
+from rhpl.translate import _
def module_walker(topdir):
diff --git a/server/server.py b/server/server.py
index 73ef114..cd3c9e7 100755
--- a/server/server.py
+++ b/server/server.py
@@ -17,7 +17,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# standard modules
import SimpleXMLRPCServer
import string
-import socket
import sys
import traceback