summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gettor/blacklist.py1
-rw-r--r--lib/gettor/config.py5
-rw-r--r--lib/gettor/gtlog.py8
-rw-r--r--lib/gettor/opt.py3
-rw-r--r--lib/gettor/utils.py2
5 files changed, 2 insertions, 17 deletions
diff --git a/lib/gettor/blacklist.py b/lib/gettor/blacklist.py
index cc1ccc7..6b6305b 100644
--- a/lib/gettor/blacklist.py
+++ b/lib/gettor/blacklist.py
@@ -80,6 +80,7 @@ class BWList:
if address is None:
log.error("Argument 'address' is None")
return False
+ hashString = self.getHash(address)
globPath = os.path.join(self.blacklistDir, blacklistName)
hashVec = glob.glob(os.path.join(globPath, hashString))
for entry in hashVec:
diff --git a/lib/gettor/config.py b/lib/gettor/config.py
index e4e428f..357b6ae 100644
--- a/lib/gettor/config.py
+++ b/lib/gettor/config.py
@@ -188,8 +188,3 @@ class Config:
def getDefaultFrom(self):
return self.useConf["defaultFrom"][0]
-
-if __name__ == "__main__" :
- c = Config()
- print "# This is a suitable default configuration. Tune to fit your needs."
- c.printConfiguration()
diff --git a/lib/gettor/gtlog.py b/lib/gettor/gtlog.py
index 76327cc..9d67685 100644
--- a/lib/gettor/gtlog.py
+++ b/lib/gettor/gtlog.py
@@ -87,11 +87,3 @@ def getLogger():
if logger is None:
initialize()
return logger
-
-if __name__ == "__main__" :
- initialize()
- print "This is the logging module. You probably do not want to call it by hand."
- print "We'll send a test logging message now with the following subsystem: " + \
- getLogSubSystem()
- log = getLogger()
- log.info("I'm a logger, logging!")
diff --git a/lib/gettor/opt.py b/lib/gettor/opt.py
index d15f4c3..1d6f028 100644
--- a/lib/gettor/opt.py
+++ b/lib/gettor/opt.py
@@ -65,6 +65,3 @@ def parseOpts():
metavar="DIR")
return cmdParser.parse_args()
-
-if __name__ == "__main__":
- print >> sys.stderr, "You shouldn't run this directly."
diff --git a/lib/gettor/utils.py b/lib/gettor/utils.py
index 7f99487..d102063 100644
--- a/lib/gettor/utils.py
+++ b/lib/gettor/utils.py
@@ -271,7 +271,7 @@ def setCmdPassword(conf, password):
os.chmod(cmdPassFile, 0400)
return True
except Exception, e:
- log.error("Creating list entry %s failed: %s" % (entry, e))
+ log.error("Creating pass file failed: %s" % e)
return False
def verifyPassword(conf, password):