mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
Remove unused imports, variables, and redundant parentheses
This commit is contained in:
parent
1a3b1ce4b6
commit
58d439f3eb
2 changed files with 3 additions and 10 deletions
|
@ -2,12 +2,9 @@
|
||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
import time
|
|
||||||
import shutil
|
|
||||||
import sys
|
import sys
|
||||||
import core
|
import core
|
||||||
|
|
||||||
from subprocess import Popen
|
|
||||||
from core import logger, nzbToMediaDB
|
from core import logger, nzbToMediaDB
|
||||||
from core.nzbToMediaUtil import convert_to_ascii, CharReplace, plex_update
|
from core.nzbToMediaUtil import convert_to_ascii, CharReplace, plex_update
|
||||||
from core.nzbToMediaUserScript import external_script
|
from core.nzbToMediaUserScript import external_script
|
||||||
|
|
|
@ -527,7 +527,6 @@ def process(inputDirectory, inputName=None, status=0, clientAgent='manual', down
|
||||||
|
|
||||||
myDB = nzbToMediaDB.DBConnection()
|
myDB = nzbToMediaDB.DBConnection()
|
||||||
|
|
||||||
encoded = False
|
|
||||||
inputDirectory1 = inputDirectory
|
inputDirectory1 = inputDirectory
|
||||||
inputName1 = inputName
|
inputName1 = inputName
|
||||||
|
|
||||||
|
@ -633,9 +632,6 @@ def main(args, section=None):
|
||||||
# Initialize the config
|
# Initialize the config
|
||||||
core.initialize(section)
|
core.initialize(section)
|
||||||
|
|
||||||
# clientAgent for NZBs
|
|
||||||
clientAgent = core.NZB_CLIENTAGENT
|
|
||||||
|
|
||||||
logger.info("#########################################################")
|
logger.info("#########################################################")
|
||||||
logger.info("## ..::[{0}]::.. ##".format(os.path.basename(__file__)))
|
logger.info("## ..::[{0}]::.. ##".format(os.path.basename(__file__)))
|
||||||
logger.info("#########################################################")
|
logger.info("#########################################################")
|
||||||
|
@ -792,16 +788,16 @@ def main(args, section=None):
|
||||||
print result[1] + "!" # For SABnzbd Status display.
|
print result[1] + "!" # For SABnzbd Status display.
|
||||||
if os.environ.has_key('NZBOP_SCRIPTDIR'): # return code for nzbget v11
|
if os.environ.has_key('NZBOP_SCRIPTDIR'): # return code for nzbget v11
|
||||||
del core.MYAPP
|
del core.MYAPP
|
||||||
return (core.NZBGET_POSTPROCESS_SUCCESS)
|
return core.NZBGET_POSTPROCESS_SUCCESS
|
||||||
else:
|
else:
|
||||||
logger.error("A problem was reported in the {0} script.".format(args[0]))
|
logger.error("A problem was reported in the {0} script.".format(args[0]))
|
||||||
if result[1]:
|
if result[1]:
|
||||||
print result[1] + "!" # For SABnzbd Status display.
|
print result[1] + "!" # For SABnzbd Status display.
|
||||||
if os.environ.has_key('NZBOP_SCRIPTDIR'): # return code for nzbget v11
|
if os.environ.has_key('NZBOP_SCRIPTDIR'): # return code for nzbget v11
|
||||||
del core.MYAPP
|
del core.MYAPP
|
||||||
return (core.NZBGET_POSTPROCESS_ERROR)
|
return core.NZBGET_POSTPROCESS_ERROR
|
||||||
del core.MYAPP
|
del core.MYAPP
|
||||||
return (result[0])
|
return result[0]
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue