Example #1
0
 def _read_config_file(self):
     #TODO: add errors printing
     try:
         return raw_parse_ini_file(DEFAULT_CONFIG_PATH)
     except IOError:
         return {}
     except ParseError:
         return {}
Example #2
0
 def test_parse_normal_file(self):
     filename = "pie/launcher/test/normal.ini"
     result = raw_parse_ini_file(filename)
     self.assertEqual(result['PHP']['display_errors'], 'on')
     self.assertEqual(result['PHP']['string_value'], 'OK. It works')
     self.assertEqual(result['PHP']['int_value'], '55')
     self.assertEqual(result['next_section']['any_value'], '57')
     self.assertEqual(result['next_section']['string_value'], 'No, it doesn\'t work')