If your goal here is simply to detect if "lms" or "cms" is one of the arguments, why not do something like `if "lms" in sys.argv` or `if "cms" in sys.argv`?