]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
testsuite, python: reformat python files using black
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Mon, 19 Feb 2024 13:08:31 +0000 (14:08 +0100)
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Mon, 19 Feb 2024 13:08:31 +0000 (14:08 +0100)
In the recent patch titled "gdb, python: selectively omit enabling
stdin in gdb.execute", the black tool found formatting issues.  Fix
them.

gdb/testsuite/gdb.python/py-cmd-exception.py
gdb/testsuite/gdb.python/py-cmd-prompt.py

index e44b184ebd500eff903436ea3f860ce564d76796..d37257d15c0cb0aabc0d0b154cbc028a21ee0ee3 100644 (file)
@@ -15,6 +15,7 @@
 
 import gdb
 
+
 class MyListener:
     def __init__(self):
         gdb.events.new_objfile.connect(self.handle_new_objfile_event)
@@ -24,10 +25,11 @@ class MyListener:
         if self.processed_objfile:
             return
 
-        print('loading ' + event.new_objfile.filename)
+        print("loading " + event.new_objfile.filename)
         self.processed_objfile = True
 
         # There is no variable 'a'.  The command raises an exception.
-        gdb.execute('print a')
+        gdb.execute("print a")
+
 
 the_listener = MyListener()
index ac1fdece0468f82ec2122c16ac6d312a57275cca..b80a0c93fa476da6f0717f933f809d67c65c44f1 100644 (file)
@@ -15,6 +15,7 @@
 
 import gdb
 
+
 class MyListener:
     def __init__(self):
         gdb.events.new_objfile.connect(self.handle_new_objfile_event)
@@ -25,12 +26,13 @@ class MyListener:
         if self.processed_objfile:
             return
 
-        print('loading ' + event.new_objfile.filename)
+        print("loading " + event.new_objfile.filename)
         self.processed_objfile = True
 
-        gdb.execute('add-inferior -no-connection')
-        gdb.execute('inferior 2')
-        gdb.execute('target remote ' + self.port)
-        gdb.execute('inferior 1')
+        gdb.execute("add-inferior -no-connection")
+        gdb.execute("inferior 2")
+        gdb.execute("target remote " + self.port)
+        gdb.execute("inferior 1")
+
 
 the_listener = MyListener()