@@ -20,8 +20,9 @@ def create_meta_dictionary(metalist):
2020 meta_items [name ] = {}
2121 try :
2222 if meta_items [name ]['tag' ] != tag :
23- raise ValueError ('Different tags - %s, %s - for the same item %s' %
24- (meta_items [name ]['tag' ], tag , name ))
23+ raise ValueError (
24+ 'Different tags - %s, %s - for the same item %s' % (
25+ meta_items [name ]['tag' ], tag , name ))
2526 except KeyError :
2627 meta_items [name ]['tag' ] = tag
2728 meta_items [name ][param ] = value
@@ -60,12 +61,15 @@ def parse_fpg(filename):
6061 # and carry on as usual.
6162 line = line .replace ('\_' , ' ' ).replace ('?meta' , '' )
6263 line = line .replace ('\n ' , '' ).lstrip ().rstrip ()
63- lineSplit = line .split ('\t ' )
64- name = lineSplit [0 ]
65- tag = lineSplit [1 ]
66- param = lineSplit [2 ]
67- value = lineSplit [3 :][0 ] if len (lineSplit [3 :]) == 1 else ' ' .join (lineSplit [3 :])
68- #name, tag, param, value = line.split('\t')
64+ line_split = line .split ('\t ' )
65+ name = line_split [0 ]
66+ tag = line_split [1 ]
67+ param = line_split [2 ]
68+ if len (line_split [3 :]) == 1 :
69+ value = line_split [3 :][0 ]
70+ else :
71+ value = ' ' .join (line_split [3 :])
72+ # name, tag, param, value = line.split('\t')
6973 name = name .replace ('/' , '_' )
7074 metalist .append ((name , tag , param , value ))
7175 elif line .startswith ('?register' ):
0 commit comments