From 289e439388c14320447e1b536eec50bc4cbbbde9 Mon Sep 17 00:00:00 2001 From: moritz <email@moritz-huebner.de> Date: Thu, 12 Apr 2018 16:43:05 +1000 Subject: [PATCH] Moritz Huebner: Introduced except block for now again with a sensible warning given the current state.. --- peyote/source.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/peyote/source.py b/peyote/source.py index 9beb5b191..671f3e08f 100644 --- a/peyote/source.py +++ b/peyote/source.py @@ -2,8 +2,17 @@ from __future__ import division, print_function import os -import lal -import lalsimulation as lalsim +try: + import lal +except ImportError: + raise ImportWarning("You do not have lalsuite installed currently. You will not be able to use some of the " + "prebuilt functions.") +try: + import lalsimulation as lalsim +except ImportError: + raise ImportWarning("You do not have lalsuite installed currently. You will not be able to use some of the " + "prebuilt functions.") + from astropy.table import Table from utils import nfft, get_sampling_frequency -- GitLab