Issue #77: fix - Remove spurrious spaces.

This commit is contained in:
Steven Black
2016-02-15 12:29:02 -05:00
parent 61913c08ee
commit d69aa1add3
+1 -1
View File
@@ -282,7 +282,7 @@ def normalizeRule(rule):
result = re.search(r'^[ \t]*(\d+\.\d+\.\d+\.\d+)\s+([\w\.-]+)(.*)', rule)
if result:
hostname, suffix = result.group(2,3)
hostname = hostname.lower() # explicitly lowercase hostname
hostname = hostname.lower().strip() # explicitly lowercase and trim the hostname
if suffix is not '':
# add suffix as comment only, not as a separate host
return hostname, "%s %s #%s\n" % (TARGET_HOST, hostname, suffix)