Skip to content

Commit

Permalink
Issue StevenBlack#77: fix - Remove spurrious spaces.
Browse files Browse the repository at this point in the history
Former-commit-id: d69aa1a
Former-commit-id: 47e58f09ed77e9048aac1bfb8a9ffa01e1845c02
  • Loading branch information
StevenBlack committed Feb 15, 2016
1 parent c16b937 commit f4d4835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion updateHostsFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f4d4835

Please sign in to comment.