@@ -238,6 +238,7 @@ def run_callbacks(self, templ):
238238 for tag in self .sect [i ]:
239239 self .sect [i ][tag ].run_callbacks (templ .sect [i ][None ])
240240
241+
241242#verify!
242243
243244 def sanity_check (self , path = None ):
@@ -556,6 +557,8 @@ def __init__(self, templ=None):
556557 self .path = None
557558 if GetkwParser .bnf == None :
558559 GetkwParser .bnf = self .getkw_bnf ()
560+
561+
559562# self.parseString=self.bnf.parseString
560563# GetkwParser.bnf.setDebug(True)
561564
@@ -648,8 +651,8 @@ def store_vector(self, s, l, t):
648651 if k .nargs == - 1 :
649652 pass
650653 elif len (arg ) != k .nargs :
651- print ("Invalid number of elements for key '%s', \
652- line: %d" % ( name , lineno (self .loc , self .strg )))
654+ print ("Invalid number of elements for key '{:s}', line: {:d}" . format (
655+ name , lineno (self .loc , self .strg )))
653656 print (" -> %d required, %d given." % (k .nargs , len (arg )))
654657 if strict :
655658 sys .exit (1 )
@@ -779,6 +782,7 @@ def parse_error(s, t, d, err):
779782 print ("Parse error, line %d: %s" % (lineno (err .loc , err .pstr ), line (err .loc , err .pstr )))
780783 sys .exit (1 )
781784
785+
782786######## Convenience routines for callbacks ########
783787
784788
@@ -814,6 +818,7 @@ def check_ignored(list, sect):
814818 else :
815819 print (warn % (i , sect .name , '<' + sect .tag + '>' ))
816820
821+
817822####################################################
818823
819824
0 commit comments