Fix problem with no arguments
This is currently getting called with no arguments, and requires (as stands) 2. I'd handled the lack of 1 argument previously, but as of getting further along the second argument is missing.
This commit is contained in:
parent
ed07bec6e5
commit
7ac90e5d2a
|
@ -35,3 +35,4 @@ This is our current version trying to communicate between courier and mailman3.
|
|||
* Hm, go with bare "Exception"... The catch wasn't what was failing.
|
||||
* Let's try that instead?
|
||||
* Oh man... Variable not properly defined (or more derferenced.)
|
||||
* OK, it's failing further along, so maybe this works?
|
|
@ -50,7 +50,8 @@ try:
|
|||
# for qmail command docs and supplied environment variables.
|
||||
# We need to replace "1" with an empty string, as qmail only supports EXT,
|
||||
# EXT2, EXT3, EXT4.
|
||||
arg_ext = sys.argv[2] if sys.argv[2] != "1" else ""
|
||||
arg_ext_tmp = sys.argv[2] if len(sys.argv) > 2 else "1"
|
||||
arg_ext = arg_ext_tmp if arg_ext_tmp != "1" else ""
|
||||
lmtp.sendmail(
|
||||
os.environ['SENDER'],
|
||||
os.environ['EXT' + arg_ext] + "@" + os.environ['HOST'],
|
||||
|
|
Loading…
Reference in New Issue