1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-26 01:26:50 +00:00

FIX: Removed Comicvine API key from being written to logs when post-processing

This commit is contained in:
evilhero 2016-04-14 11:58:07 -04:00
parent 77cb97ca7f
commit eb49fbb727

View file

@ -165,14 +165,21 @@ def run(dirName, nzbName=None, issueid=None, comversion=None, manual=None, filen
logger.info(module + ' ' + tagdisp + ' meta-tagging processing started.') logger.info(module + ' ' + tagdisp + ' meta-tagging processing started.')
currentScriptName = [sys.executable, comictagger_cmd] currentScriptName = [sys.executable, comictagger_cmd]
logger.fdebug(module + ' Enabling ComicTagger script: ' + str(currentScriptName) + ' with options: ' + str(f_tagoptions))
# generate a safe command line string to execute the script and provide all the parameters
script_cmd = currentScriptName + f_tagoptions script_cmd = currentScriptName + f_tagoptions
# use subprocess to run the command and capture output if initial_ctrun:
logger.fdebug(module + ' Executing command: ' +str(script_cmd)) logger.fdebug(module + ' Enabling ComicTagger script: ' + str(currentScriptName) + ' with options: ' + str(f_tagoptions))
script_cmdlog = script_cmd
else:
logger.fdebug(module + ' Enabling ComicTagger script: ' + str(currentScriptName) + ' with options: ' + re.sub(f_tagoptions[f_tagoptions.index(mylar.COMICVINE_API)], 'REDACTED', str(f_tagoptions)))
# generate a safe command line string to execute the script and provide all the parameters
script_cmdlog = re.sub(f_tagoptions[f_tagoptions.index(mylar.COMICVINE_API)], 'REDACTED', str(script_cmd))
logger.fdebug(module + ' Executing command: ' +str(script_cmdlog))
logger.fdebug(module + ' Absolute path to script: ' +script_cmd[0]) logger.fdebug(module + ' Absolute path to script: ' +script_cmd[0])
try: try:
# use subprocess to run the command and capture output
p = subprocess.Popen(script_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) p = subprocess.Popen(script_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
out, err = p.communicate() out, err = p.communicate()
#logger.info(out) #logger.info(out)
@ -214,8 +221,7 @@ def run(dirName, nzbName=None, issueid=None, comversion=None, manual=None, filen
logger.info(module + '[COMIC-TAGGER] Successfully wrote ' + tagdisp + ' [' + filepath + ']') logger.info(module + '[COMIC-TAGGER] Successfully wrote ' + tagdisp + ' [' + filepath + ']')
i+=1 i+=1
except OSError, e: except OSError, e:
#Cannot find The Walking Dead 150 (2016) (Digital) (Zone-Empire).cbr logger.warn(module + '[COMIC-TAGGER] Unable to run comictagger with the options provided: ' + re.sub(f_tagoptions[f_tagoptions.index(mylar.COMICVINE_API)], 'REDACTED', str(script_cmd)))
logger.warn(module + '[COMIC-TAGGER] Unable to run comictagger with the options provided: ' + str(script_cmd))
return "fail" return "fail"
if mylar.CBR2CBZ_ONLY and initial_ctrun == False: if mylar.CBR2CBZ_ONLY and initial_ctrun == False: