Whitespace cleanup
authorEli Bendersky <eliben@gmail.com>
Thu, 9 Jul 2015 12:34:02 +0000 (05:34 -0700)
committerEli Bendersky <eliben@gmail.com>
Thu, 9 Jul 2015 12:34:02 +0000 (05:34 -0700)
elftools/common/construct_utils.py
elftools/dwarf/abbrevtable.py

index 53caa978fd1ed493c4bfa076cadc9ca85b41c776..8ace30efd9eab4a4dd9f4c2e8ee87357499bbf15 100644 (file)
@@ -10,11 +10,11 @@ from ..construct import Subconstruct, ConstructError, ArrayError
 
 
 class RepeatUntilExcluding(Subconstruct):
-    """ A version of construct's RepeatUntil that doesn't include the last 
+    """ A version of construct's RepeatUntil that doesn't include the last
         element (which casued the repeat to exit) in the return value.
-        
+
         Only parsing is currently implemented.
-        
+
         P.S. removed some code duplication
     """
     __slots__ = ["predicate"]
@@ -29,7 +29,7 @@ class RepeatUntilExcluding(Subconstruct):
             context_for_subcon = context
             if self.subcon.conflags & self.FLAG_COPY_CONTEXT:
                 context_for_subcon = context.__copy__()
-            
+
             while True:
                 subobj = self.subcon._parse(stream, context_for_subcon)
                 if self.predicate(subobj, context):
@@ -42,4 +42,3 @@ class RepeatUntilExcluding(Subconstruct):
         raise NotImplementedError('no building')
     def _sizeof(self, context):
         raise SizeofError("can't calculate size")
-
index 44ccdd5e5a277c43dda1df75ac8eb5324463b6d1..36f6d2a0973b16ca2cc934e8fd9438ef6da2a68e 100644 (file)
@@ -15,10 +15,10 @@ class AbbrevTable(object):
     def __init__(self, structs, stream, offset):
         """ Create new abbreviation table. Parses the actual table from the
             stream and stores it internally.
-        
+
             structs:
                 A DWARFStructs instance for parsing the data
-            
+
             stream, offset:
                 The stream and offset into the stream where this abbreviation
                 table lives.
@@ -26,7 +26,7 @@ class AbbrevTable(object):
         self.structs = structs
         self.stream = stream
         self.offset = offset
-        
+
         self._abbrev_map = self._parse_abbrev_table()
 
     def get_abbrev(self, code):
@@ -54,15 +54,15 @@ class AbbrevTable(object):
 
 
 class AbbrevDecl(object):
-    """ Wraps a parsed abbreviation declaration, exposing its fields with 
+    """ Wraps a parsed abbreviation declaration, exposing its fields with
         dict-like access, and adding some convenience methods.
-        
+
         The abbreviation declaration represents an "entry" that points to it.
     """
     def __init__(self, code, decl):
         self.code = code
         self.decl = decl
-    
+
     def has_children(self):
         """ Does the entry have children?
         """
@@ -74,7 +74,6 @@ class AbbrevDecl(object):
         """
         for attr_spec in self['attr_spec']:
             yield attr_spec.name, attr_spec.form
-            
+
     def __getitem__(self, entry):
         return self.decl[entry]
-