From da7f5102d66db0318707f990300dedf17991de01 Mon Sep 17 00:00:00 2001
From: "kuldeep.k@cisinlabs.com" <kuldeep.k@cisinlabs.com>
Date: Wed, 8 Sep 2021 19:41:23 +0530
Subject: [PATCH] Updated flake8 indentation changes & added return None to
 queryHTTP exceptions

---
 src/namecoin.py | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/namecoin.py b/src/namecoin.py
index 2a94f1ce..33d39070 100644
--- a/src/namecoin.py
+++ b/src/namecoin.py
@@ -53,15 +53,15 @@ class namecoinConnection(object):
         """
         if options is None:
             self.nmctype = BMConfigParser().get(
-                                configSection, "namecoinrpctype")
+                configSection, "namecoinrpctype")
             self.host = BMConfigParser().get(
-                                configSection, "namecoinrpchost")
+                configSection, "namecoinrpchost")
             self.port = int(BMConfigParser().get(
-                                configSection, "namecoinrpcport"))
+                configSection, "namecoinrpcport"))
             self.user = BMConfigParser().get(
-                                configSection, "namecoinrpcuser")
+                configSection, "namecoinrpcuser")
             self.password = BMConfigParser().get(
-                                configSection, "namecoinrpcpassword")
+                configSection, "namecoinrpcpassword")
         else:
             self.nmctype = options["type"]
             self.host = options["host"]
@@ -176,8 +176,8 @@ class namecoinConnection(object):
                         _translate(
                             "MainWindow",
                             "Success!  NMControll is up and running."
-                            )
                         )
+                    )
 
                 logger.error("Unexpected nmcontrol reply: %s", res)
                 message = (
@@ -185,8 +185,8 @@ class namecoinConnection(object):
                     _translate(
                         "MainWindow",
                         "Couldn\'t understand NMControl."
-                        )
                     )
+                )
 
             else:
                 sys.exit("Unsupported Namecoin type")
@@ -247,6 +247,7 @@ class namecoinConnection(object):
             self.con.send(data)
         except:  # noqa:E722
             logger.info("HTTP connection error")
+            return None
 
         try:
             resp = self.con.getresponse()
@@ -257,6 +258,7 @@ class namecoinConnection(object):
                     " %i: %s" % (resp.status, resp.reason))
         except:  # noqa:E722
             logger.info("HTTP receive error")
+            return None
 
         return result