uhhhm
This commit is contained in:
parent
fd9c583b84
commit
4e8254fbe9
@ -75,11 +75,14 @@ yc_args = [notifier, d_server, d_sender, d_destination, d_priority, d_message, d
|
|||||||
|
|
||||||
# Get params during execution. Params found here, override minimal defaults and/or config settings.
|
# Get params during execution. Params found here, override minimal defaults and/or config settings.
|
||||||
|
|
||||||
if ga(notifier, options, long_options) is None:
|
# noinspection PyRedeclaration
|
||||||
pass
|
a_sender, a_destination, a_message, a_priority, a_tags, a_click = ga(notifier, options, long_options)
|
||||||
# sender, destination, priority, message, tags, click = "", "", "", "", "", ""
|
|
||||||
else:
|
if a_sender != '': sender = a_sender
|
||||||
sender, destination, priority, message, tags, click = ga(notifier, options, long_options)
|
if a_destination != '': destination = a_destination
|
||||||
|
if a_priority != "": priority = a_priority
|
||||||
|
if a_tags != "": tags = a_tags
|
||||||
|
if a_click != "": click = a_click
|
||||||
|
|
||||||
# Get the threat level from the message and map it to priority
|
# Get the threat level from the message and map it to priority
|
||||||
|
|
||||||
|
|||||||
@ -204,16 +204,19 @@ def call_for_help(notifier):
|
|||||||
def get_arguments(notifier, options, long_options):
|
def get_arguments(notifier, options, long_options):
|
||||||
# Get params during execution. Params found here, override minimal defaults and/or config settings.
|
# Get params during execution. Params found here, override minimal defaults and/or config settings.
|
||||||
|
|
||||||
|
notifier: str = notifier.lower()
|
||||||
|
|
||||||
help_text = call_for_help(notifier)
|
help_text = call_for_help(notifier)
|
||||||
|
|
||||||
sender, destination, message, priority, tags, click = "", "", "", "", "", ""
|
sender, destination, message, priority, tags, click = "", "", "", "", "", ""
|
||||||
notifier: str = notifier.lower()
|
|
||||||
|
|
||||||
if notifier == "discord":
|
|
||||||
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
argument_list: list = sys.argv[1:]
|
argument_list: list = sys.argv[1:]
|
||||||
|
|
||||||
|
if not argument_list:
|
||||||
|
pass
|
||||||
|
|
||||||
|
else:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Parsing argument
|
# Parsing argument
|
||||||
arguments, values = getopt.getopt(argument_list, options, long_options)
|
arguments, values = getopt.getopt(argument_list, options, long_options)
|
||||||
@ -251,4 +254,4 @@ def get_arguments(notifier, options, long_options):
|
|||||||
# output error, and return with an error code
|
# output error, and return with an error code
|
||||||
print(str(err))
|
print(str(err))
|
||||||
|
|
||||||
return sender, destination, priority, tags, click
|
return sender, destination, message, priority, tags, click
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user