Merge pull request #6923 from jacksontj/develop

Fix for compound command and glob tgt not being a string
This commit is contained in:
Thomas S Hatch 2013-08-27 15:10:37 -07:00
commit 96102e7e12
2 changed files with 13 additions and 3 deletions

View File

@ -1989,7 +1989,14 @@ class ClearFuncs(object):
# check if the cmd is blacklisted
for module_re in self.opts['client_acl_blacklist'].get('modules', []):
if re.match(module_re, clear_load['fun']):
# if this is a regular command, its a single function
if type(clear_load['fun']) == str:
funs_to_check = [ clear_load['fun'] ]
# if this a compound function
else:
funs_to_check = clear_load['fun']
for func in funs_to_check:
if re.match(module_re, fun):
good = False
break

View File

@ -1408,6 +1408,9 @@ class Matcher(object):
'''
Returns true if the passed glob matches the id
'''
if type(tgt) != str:
return False
return fnmatch.fnmatch(self.opts['id'], tgt)
def pcre_match(self, tgt):