File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -340,10 +340,22 @@ def read_config(filename):
340340 break
341341
342342 # remove line returns
343- line = line .strip ('\r \n ' )
343+ line = line .strip ('\r \n ' ).strip ()
344+
345+ if (len (line ) == 0 ):
346+ continue
344347 # make sure it has useful data
345- if (not "=" in line ) or ( line [0 ] == '%' ):
348+ if (line [0 ] == '%' ):
346349 continue
350+
351+ while (line [0 ].endswith ('\\ ' ) or len (line .split ('\\ ' )) > 1 ):
352+ tmp_line = input_file .readline ()
353+ tmp_line = tmp_line .strip ()
354+ assert len (tmp_line .split ('=' )) <= 1 , ('Statement after line continuation parameter in config file %s' % tmp_line )
355+ if (not tmp_line .startswith ('%' )):
356+ line = line .split ('\\ ' )[0 ]
357+ line += ' ' + tmp_line
358+
347359 # split across equals sign
348360 line = line .split ("=" ,1 )
349361 this_param = line [0 ].strip ()
You can’t perform that action at this time.
0 commit comments