Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_versions():
try:
import cfunits
except ImportError:
v_cfunits = None
else:
v_cfunits = cfunits.__version__
try:
import cf_units
except ImportError:
v_cf_units = None
else:
v_cf_units = cf_units.__version__
try:
from ocgis.regrid.base import ESMF
except ImportError:
v_esmf = None
else:
v_esmf = ESMF.__release__
try:
import icclim
except ImportError:
v_icclim = None