From ffa7c78e1e232083383851f03c00211c1ee6c9a7 Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Sat, 8 Jul 2023 10:45:59 -0700 Subject: [PATCH] Update restbase.py Fix bad info --- wptools/restbase.py | 3 +++ 1 file changed, 3 insertions(+) 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']