X-Git-Url: https://git.phdru.name/?p=m_lib.git;a=blobdiff_plain;f=m_lib%2Fflad%2Fflad.py;h=232852f78dd20b63eb48491465360d738c4cf7f2;hp=a058fabbea34c0f9a64feb7d22483dcce6dd85ca;hb=4dedeb2041f8b9f7796991c2ff513f9e3aa8b386;hpb=c8455bf373d58d8b2928ba3d56488318f4095b83 diff --git a/m_lib/flad/flad.py b/m_lib/flad/flad.py index a058fab..232852f 100644 --- a/m_lib/flad/flad.py +++ b/m_lib/flad/flad.py @@ -4,9 +4,6 @@ """ -import string - - # Flad restriction error checking_error = "flad.checking_error" @@ -83,7 +80,7 @@ class Flad(list): """ Split input line to key/value pair and add the pair to dictionary """ - ###line = string.lstrip(line) # Do not rstrip - if empty value, this will remove space from key + ###line = line.lstrip() # Do not rstrip - if empty value, this will remove space from key if line[-1] == '\n': line = line[:-1] # Chop @@ -118,12 +115,12 @@ class Flad(list): def feed(self, record, line): # Method can be overriden in subclasses if line: if self.wait_comment: - if string.strip(line) == '': + if line.strip() == '': self.comment = self.comment + '\n' self.wait_string = 0 return 0 - elif string.lstrip(line)[0] == '#': + elif line.lstrip()[0] == '#': self.comment = self.comment + line return 0