]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
scripts/gdb: fix PEP8 compliance
authorThiébaud Weksteen <thiebaud@weksteen.fr>
Tue, 30 Jun 2015 21:58:18 +0000 (14:58 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Jul 2015 02:44:58 +0000 (19:44 -0700)
Signed-off-by: Thiébaud Weksteen <thiebaud@weksteen.fr>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/gdb/linux/dmesg.py
scripts/gdb/linux/symbols.py
scripts/gdb/linux/tasks.py
scripts/gdb/linux/utils.py

index 3c947f0c5dad13d1c364f4960c0724727fba6c91..927d0d2a3145177dcd0b42d1cee9dbc15554c05d 100644 (file)
@@ -12,7 +12,6 @@
 #
 
 import gdb
-import string
 
 from linux import utils
 
index cd5bea965d4eb015f57b0baec1b9d4b75ac44964..627750cb420d08792868ce5b6c85b88d071e54f5 100644 (file)
@@ -14,9 +14,8 @@
 import gdb
 import os
 import re
-import string
 
-from linux import modules, utils
+from linux import modules
 
 
 if hasattr(gdb, 'Breakpoint'):
@@ -97,7 +96,7 @@ lx-symbols command."""
             return ""
         attrs = sect_attrs['attrs']
         section_name_to_address = {
-            attrs[n]['name'].string() : attrs[n]['address']
+            attrs[n]['name'].string(): attrs[n]['address']
             for n in range(int(sect_attrs['nsections']))}
         args = []
         for section_name in [".data", ".data..read_mostly", ".rodata", ".bss"]:
@@ -124,7 +123,7 @@ lx-symbols command."""
                 addr=module_addr,
                 sections=self._section_arguments(module))
             gdb.execute(cmdline, to_string=True)
-            if not module_name in self.loaded_modules:
+            if module_name not in self.loaded_modules:
                 self.loaded_modules.append(module_name)
         else:
             gdb.write("no module object found for '{0}'\n".format(module_name))
@@ -164,7 +163,7 @@ lx-symbols command."""
         self.load_all_symbols()
 
         if hasattr(gdb, 'Breakpoint'):
-            if not self.breakpoint is None:
+            if self.breakpoint is not None:
                 self.breakpoint.delete()
                 self.breakpoint = None
             self.breakpoint = LoadModuleBreakpoint(
index e2037d9bb7eb89dc8fa5b884313b7c55ed3bfb14..89d38e1580e34224ba7b100f2a85544d5c3bcb65 100644 (file)
@@ -18,6 +18,7 @@ from linux import utils
 
 task_type = utils.CachedType("struct task_struct")
 
+
 def task_lists():
     global task_type
     task_ptr_type = task_type.get_type().pointer()
@@ -38,6 +39,7 @@ def task_lists():
         if t == init_task:
             return
 
+
 def get_task_by_pid(pid):
     for task in task_lists():
         if int(task['pid']) == pid:
index d7ff3a39b6720c919469ef3da2fef7762303545e..0893b326a28b8fc938f705edc93f76a479166d86 100644 (file)
@@ -151,6 +151,6 @@ def get_gdbserver_type():
             gdbserver_type = GDBSERVER_QEMU
         elif probe_kgdb():
             gdbserver_type = GDBSERVER_KGDB
-        if not gdbserver_type is None and hasattr(gdb, 'events'):
+        if gdbserver_type is not None and hasattr(gdb, 'events'):
             gdb.events.exited.connect(exit_handler)
     return gdbserver_type