diff --git a/wptools/restbase.py b/wptools/restbase.py index 2e1d859..f3cd4d9 100644 --- a/wptools/restbase.py +++ b/wptools/restbase.py @@ -42,6 +42,9 @@ def _handle_response(self): """ returns RESTBase response if appropriate """ + if not self.cache['restbase'].get('info'): + return + content = self.cache['restbase']['info']['content-type'] if content.startswith('text/html'): html = self.cache['restbase']['response']