File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -111,8 +111,12 @@ def get_mapping_list():
111111 with open (join (self_path , 'MAPPING.CONFIG' ), "rU" ) as file_in :
112112 for line in file_in .readlines ():
113113 if not line .startswith ('#' ) and ':' in line :
114- about_spec_key = line .partition (':' )[0 ]
114+ about_spec_key = line .partition (':' )[0 ]
115115 user_spec_key = line .partition (':' )[2 ].strip ()
116+ # Handle cases which keys contain spaces
117+ if about_spec_key .endswith (' ' ):
118+ about_spec_key = about_spec_key .strip ()
119+ about_spec_key = about_spec_key .replace (' ' , '_' )
116120 mapping_list [about_spec_key .lower ()] = user_spec_key .lower ()
117121 except Exception as e :
118122 print (repr (e ))
Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ def test_get_non_empty_rows_list(self):
5858 output = gen .get_non_empty_rows_list (input_list )
5959 self .assertEquals (output , expected_list )
6060
61-
6261 def test_get_mapping_list (self ):
6362 gen = genabout .GenAbout ()
6463 expected_list = {'about_file' : 'directory/filename' ,
You can’t perform that action at this time.
0 commit comments