diff --git a/scripts/hostlogger_test.py b/scripts/hostlogger_test.py
index 6080b34..415c584 100755
--- a/scripts/hostlogger_test.py
+++ b/scripts/hostlogger_test.py
@@ -15,7 +15,9 @@
 parser = argparse.ArgumentParser()
 parser.add_argument("--host", help="Host to connect to", required=True)
 parser.add_argument("--cert", help="File path to cert", required=True)
-parser.add_argument("--username", help="Username to connect with", default="root")
+parser.add_argument(
+    "--username", help="Username to connect with", default="root"
+)
 parser.add_argument("--password", help="Password to use", default="0penBmc")
 
 args = parser.parse_args()
@@ -33,10 +35,12 @@
         data = resp.json()
 
         if resp.status_code != requests.codes.ok:
-            print "There occurs error when get request, status_code = " + str(
-                resp.status_code
-            ) + "\n"
-            print json.dumps(data, indent=4, sort_keys=True)
+            print(
+                "There occurs error when get request, status_code = "
+                + str(resp.status_code)
+                + "\n"
+            )
+            print(json.dumps(data, indent=4, sort_keys=True))
             pass
 
         return data
@@ -58,9 +62,8 @@
 def main():
     logging.captureWarnings(True)
     totalEntryUri = (
-        "https://{}/redfish/v1/Systems/system/LogServices/HostLogger/Entries/".format(
-            args.host
-        )
+        "https://{}/redfish/v1/Systems/system/"
+        + "LogServices/HostLogger/Entries/".format(args.host)
     )
     id = 0
     entryCount = 0
@@ -69,8 +72,8 @@
     while 1:
         entryCount = label_parser(totalEntryUri, "Members@odata.count")
         if id == entryCount:
-            # entryCount equals to ID means there has no change during the interval,
-            # sleep 5 seconds for next search.
+            # entryCount equals to ID means there has no change during the
+            # interval, sleep 5 seconds for next search.
             time.sleep(5)
         elif id < entryCount:
             # print new entries which created in this interval.
@@ -80,8 +83,9 @@
                     "HostLogger/Entries/{}".format(args.host, i)
                 )
                 message = label_parser(singleEntryUri, "Message")
-                # need to present all special characters, so use "repr" function
-                print (repr(message))
+                # need to present all special characters, so use "repr"
+                # function
+                print(repr(message))
             id = entryCount
 
 
