From 3d15074bdd354f5078e1ddca4696f616d2c32e53 Mon Sep 17 00:00:00 2001 From: dece Date: Sat, 13 Mar 2021 18:58:19 +0100 Subject: [PATCH] browser: clean --- bebop/browser.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bebop/browser.py b/bebop/browser.py index bcba8bc..095f98d 100644 --- a/bebop/browser.py +++ b/bebop/browser.py @@ -252,15 +252,15 @@ class Browser: if not connected: if req.state == Request.STATE_ERROR_CERT: error = f"Certificate was missing or corrupt ({url})." - self.set_status_error(error) elif req.state == Request.STATE_UNTRUSTED_CERT: - self.set_status_error(f"Certificate has been changed ({url}).") + error = f"Certificate has been changed ({url})." # TODO propose the user ways to handle this. elif req.state == Request.STATE_CONNECTION_FAILED: - error = f": {req.error}" if req.error else "." - self.set_status_error(f"Connection failed ({url}){error}") + error_details = f": {req.error}" if req.error else "." + error = f"Connection failed ({url})" + error_details else: - self.set_status_error(f"Connection failed ({url}).") + error = f"Connection failed ({url})." + self.set_status_error(error) return if req.state == Request.STATE_INVALID_CERT: