From 4f3e9f2bf7f1bc89341a70df87cd6dfcb94569b7 Mon Sep 17 00:00:00 2001 From: James McMurray Date: Wed, 11 Dec 2013 13:27:54 +0100 Subject: [PATCH] Testing modification for ReadTheDocs to stop docstring errors --- GPy/util/datasets.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/GPy/util/datasets.py b/GPy/util/datasets.py index 7fd1b6c5..32a22d77 100644 --- a/GPy/util/datasets.py +++ b/GPy/util/datasets.py @@ -30,9 +30,12 @@ overide_manual_authorize=False neil_url = 'http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/' # Read data resources from json file. -path = os.path.join(os.path.dirname(__file__), 'data_resources.json') -json_data=open(path).read() -data_resources = json.loads(json_data) +# Don't do this when ReadTheDocs is scanning as it breaks things +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' #Checks if RTD is scanning +if not (on_rtd): + path = os.path.join(os.path.dirname(__file__), 'data_resources.json') + json_data=open(path).read() + data_resources = json.loads(json_data) def prompt_user(prompt):