From dbf4b69a28fbf5483d42d167205ccdb9deaf8db8 Mon Sep 17 00:00:00 2001 From: lethliel Date: Fri, 16 Nov 2018 14:30:13 +0100 Subject: [PATCH] In some cases the return value of yaml.load(description_text) can be a string containing 'none'. This will be fetched with isinstance(data, str) --- osclib/stagingapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osclib/stagingapi.py b/osclib/stagingapi.py index 69538cdf..752915f2 100644 --- a/osclib/stagingapi.py +++ b/osclib/stagingapi.py @@ -698,7 +698,7 @@ class StagingAPI(object): def load_prj_pseudometa(self, description_text): try: data = yaml.load(description_text) - if data is None: + if isinstance(data, str) or data is None: data = {} except (TypeError, AttributeError): data = {}