Hello,
If I understand your purpose, and the script code (error log from the Alcatel lucent switch) correctly, your script evaluates the member interfaces of an aggregated interface, if the one member interface turns down, and one standby interface turns up as expected, the script print the preset information.
Since I don't know the rest part of your code, and I don't use the getopt module, what's more, I'm not familiar with the Alcatel lucent switchs' logs, so, I cannot determine which part of the characters should I provide as the reference of your script.
As instead, I can provide you the logs of the eth-trunk, please refer to
https://support.huawei.com/hedex/hdx.do?docid=EDOC1100126530&id=EN-US_CONCEPT_0176888230&lang=enPlease find the essential part from the logs.
If you have any further questions, please feel free to let me know.