This commit is contained in:
Andrew Klychkov 2020-10-13 10:29:39 +03:00
parent 39a4f32540
commit d3486a16c8
2 changed files with 8 additions and 2 deletions

View file

@ -35,7 +35,7 @@ mysql_driver_fail_msg = 'The PyMySQL (Python 2.7 and Python 3.X) or MySQL-python
def parse_from_mysql_config_file(cnf):
# Default values of comment_prefix is '#' and ';'.
# '!' added to prevent a parsing error
# when a config file contains !include_dir parameter.
# when a config file contains !includedir parameter.
cp = configparser.ConfigParser(comment_prefixes=('#', ';', '!'))
cp.read(cnf)
return cp