mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
Use print_function to standardize printing
This commit is contained in:
parent
9f6ca4eaad
commit
ccdad818fd
1 changed files with 4 additions and 3 deletions
|
@ -499,6 +499,8 @@
|
||||||
# ### NZBGET POST-PROCESSING SCRIPT ###
|
# ### NZBGET POST-PROCESSING SCRIPT ###
|
||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import datetime
|
import datetime
|
||||||
|
@ -513,7 +515,6 @@ from core.autoProcess.autoProcessTV import autoProcessTV
|
||||||
from core.nzbToMediaUtil import getDirs, extractFiles, cleanDir, update_downloadInfoStatus, get_downloadInfo, CharReplace, convert_to_ascii, get_nzoid, plex_update
|
from core.nzbToMediaUtil import getDirs, extractFiles, cleanDir, update_downloadInfoStatus, get_downloadInfo, CharReplace, convert_to_ascii, get_nzoid, plex_update
|
||||||
from core.nzbToMediaUserScript import external_script
|
from core.nzbToMediaUserScript import external_script
|
||||||
from core import logger, nzbToMediaDB
|
from core import logger, nzbToMediaDB
|
||||||
from six import text_type
|
|
||||||
|
|
||||||
|
|
||||||
# post-processing
|
# post-processing
|
||||||
|
@ -792,14 +793,14 @@ def main(args, section=None):
|
||||||
if result[0] == 0:
|
if result[0] == 0:
|
||||||
logger.info("The {0} script completed successfully.".format(args[0]))
|
logger.info("The {0} script completed successfully.".format(args[0]))
|
||||||
if result[1]:
|
if result[1]:
|
||||||
print result[1] + "!" # For SABnzbd Status display.
|
print(result[1] + "!")
|
||||||
if 'NZBOP_SCRIPTDIR' in os.environ: # return code for nzbget v11
|
if 'NZBOP_SCRIPTDIR' in os.environ: # 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] + "!")
|
||||||
if 'NZBOP_SCRIPTDIR' in os.environ: # return code for nzbget v11
|
if 'NZBOP_SCRIPTDIR' in os.environ: # return code for nzbget v11
|
||||||
del core.MYAPP
|
del core.MYAPP
|
||||||
return core.NZBGET_POSTPROCESS_ERROR
|
return core.NZBGET_POSTPROCESS_ERROR
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue