Hey Agam, I was just skimming through this and noticed this message has the wrong variable name. It probably means that all these checks should really be in one function e.g. env_get(var_name), which will raise an exception with the right variable name.  Then you can have just one or two try..except's and save a lot of duplicated lines. (This is just cosmetic and just a maintenance script, but still worth doing, I think, to avoid confusing error messages)