gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] 01/02: flake8 gdb-iterate-dll.py


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 01/02: flake8 gdb-iterate-dll.py
Date: Mon, 05 Mar 2018 13:30:04 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnunet.

commit f18aadc5cbdef52ca02f55f24039f56dbee06321
Author: ng0 <address@hidden>
AuthorDate: Mon Mar 5 08:17:31 2018 +0000

    flake8 gdb-iterate-dll.py
---
 contrib/gdb-iterate-dll.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/contrib/gdb-iterate-dll.py b/contrib/gdb-iterate-dll.py
index d1e3a4af3..79d46aa96 100644
--- a/contrib/gdb-iterate-dll.py
+++ b/contrib/gdb-iterate-dll.py
@@ -1,6 +1,7 @@
 from gdb import *
 
-def search_dll (head, field, match, pfield):
+
+def search_dll(head, field, match, pfield):
     """
     Search in a DLL by iterates over it.
 
@@ -11,7 +12,7 @@ def search_dll (head, field, match, pfield):
       print all fields of the matched elemented
     """
 
-    (symbol, _) = lookup_symbol (head)
+    (symbol, _) = lookup_symbol(head)
     if symbol is None:
         print("Can't find symbol: " + head)
         return
@@ -23,19 +24,17 @@ def search_dll (head, field, match, pfield):
             val = int(field_val)
             res = (match == val)
         elif (field_val.type.code == gdb.TYPE_CODE_STRING) or 
(field_val.type.code == gdb.TYPE_CODE_ARRAY):
-            val = str (field_val)
+            val = str(field_val)
             res = (match == val)
         elif (field_val.type.code == gdb.TYPE_CODE_TYPEDEF):
-            val = str (field_val)
+            val = str(field_val)
             res = match in val
         else:
             continue
 
         if res:
             if pfield is None:
-                print symbol_val_def
+                print(symbol_val_def)
             else:
                 print(symbol_val_def[pfield])
         symbol_val = symbol_val_def["next"]
-
-    

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]