Put test for CONDA_BUILD variable inside a try/except