Skip to content

Commit

Permalink
minor: "hostOnly" var is definitely local
Browse files Browse the repository at this point in the history
  • Loading branch information
alaz committed Mar 24, 2012
1 parent 120c75b commit a85ca15
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mongo_repl_lag
Expand Up @@ -12,8 +12,6 @@ except:
host = os.environ.get('host', 'localhost')
port = os.environ.get('port', 27017)

hostOnly = re.compile("^(.*):\d+$")

def escape_munin(s):
return '_'+re.sub('[-.]', '_', s)

Expand All @@ -27,6 +25,7 @@ def get_master():
return con

def get_hosts(con):
hostOnly = re.compile("^(.*):\d+$")
replset = con.local['system.replset']
return [hostOnly.match(member['host']).group(1) for member in replset.find_one()['members']
if member.get('arbiterOnly', None) == None]
Expand Down

0 comments on commit a85ca15

Please sign in to comment.