test
This commit is contained in:
parent
9731e69194
commit
eb35d96612
@ -33,11 +33,6 @@ import sys
|
||||
|
||||
|
||||
def main():
|
||||
SCRIPT_PATH = os.path.realpath(__file__)
|
||||
SCRIPT_DIR = os.path.dirname(SCRIPT_PATH)
|
||||
|
||||
log_file = os.path.join(SCRIPT_DIR, "testlog.log")
|
||||
logwrite = open(log_file, 'a')
|
||||
|
||||
if "sonarr_eventtype" in os.environ:
|
||||
arr_type = "sonarr"
|
||||
@ -49,18 +44,17 @@ def main():
|
||||
arr_file_path_key = "radarr_moviefile_path"
|
||||
|
||||
sys.stdout.write("tdarr_inform Recieved %s Event from %s\n" % (arr_event_type, arr_type))
|
||||
sys.stderr.write("tdarr_inform Recieved %s Event from %s\n" % (arr_event_type, arr_type))
|
||||
|
||||
if arr_event_type == "Test":
|
||||
sys.exit(0)
|
||||
|
||||
if arr_event_type not in ["Test"]:
|
||||
elif arr_event_type not in ["Download", "Rename"]:
|
||||
raise Exception("%s is not a supported tdarr_inform Event." % arr_event_type)
|
||||
|
||||
if arr_file_path_key not in os.environ:
|
||||
raise Exception("%s Environment variable was missing." % arr_file_path_key)
|
||||
|
||||
logwrite.close()
|
||||
sys.stderr.write("%s\n" % sys.argv)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Loading…
Reference in New Issue
Block a user