Trivial refactoring

This commit is contained in:
Miroslav Stampar 2017-10-28 23:27:19 +02:00
parent 5497a6e58d
commit 8d7796f41c
2 changed files with 3 additions and 4 deletions

View File

@ -3294,11 +3294,10 @@ def createGithubIssue(errMsg, excMsg):
Automatically create a Github issue with unhandled exception information Automatically create a Github issue with unhandled exception information
""" """
issues = []
try: try:
issues = getFileItems(paths.GITHUB_HISTORY, unique=True) issues = getFileItems(paths.GITHUB_HISTORY, unique=True)
except: except:
pass issues = []
finally: finally:
issues = set(issues) issues = set(issues)
@ -3373,7 +3372,7 @@ def maskSensitiveData(msg):
retVal = getUnicode(msg) retVal = getUnicode(msg)
for item in filter(None, map(lambda x: conf.get(x), SENSITIVE_OPTIONS)): for item in filter(None, (conf.get(_) for _ in SENSITIVE_OPTIONS)):
regex = SENSITIVE_DATA_REGEX % re.sub("(\W)", r"\\\1", getUnicode(item)) regex = SENSITIVE_DATA_REGEX % re.sub("(\W)", r"\\\1", getUnicode(item))
while extractRegexResult(regex, retVal): while extractRegexResult(regex, retVal):
value = extractRegexResult(regex, retVal) value = extractRegexResult(regex, retVal)

View File

@ -1766,7 +1766,7 @@ def _cleanupOptions():
conf.string = conf.string.replace(_.encode("string_escape"), _) conf.string = conf.string.replace(_.encode("string_escape"), _)
if conf.getAll: if conf.getAll:
map(lambda x: conf.__setitem__(x, True), WIZARD.ALL) map(lambda _: conf.__setitem__(_, True), WIZARD.ALL)
if conf.noCast: if conf.noCast:
for _ in DUMP_REPLACEMENTS.keys(): for _ in DUMP_REPLACEMENTS.keys():