pixelb / crudini

A utility for manipulating ini files
GNU General Public License v2.0
443 stars 60 forks source link

Parse issue in versions 0.8 and 0.9: AttributeError #47

Closed treadmillian closed 7 years ago

treadmillian commented 7 years ago

In version 0.8 and 0.9 I get this error when running the following command. I do not get this in version 0.7

vendor/pixelb/crudini/crudini --get server/config.ini '' resources.db.params.host

Traceback (most recent call last): File "vendor/pixelb/crudini/crudini", line 962, in sys.exit(main()) File "vendor/pixelb/crudini/crudini", line 959, in main return crudini.run() File "vendor/pixelb/crudini/crudini", line 857, in run preserve_case=preserve_case) File "vendor/pixelb/crudini/crudini", line 639, in parse_file conf = self._parse_file(filename, preserve_case=preserve_case) File "vendor/pixelb/crudini/crudini", line 622, in _parse_file conf = CrudiniConfigParser(preserve_case=preserve_case) File "vendor/pixelb/crudini/crudini", line 202, in init iniparse.change_comment_syntax('%;#', allow_rem=False) AttributeError: 'module' object has no attribute 'change_comment_syntax'

Contents of config.ini file is

resources.db.params.host = localhost resources.db.params.dbname = ks_caa_smoke resources.db.params.username = ks resources.db.params.password = Interoute resources.db.params.charset = utf8

Can this be fixed soon?

pixelb commented 7 years ago

Version 0.9 should have the requirement on iniparse >= 0.3.2 (that was released in 2010) Have you an older version of iniparse installed?

treadmillian commented 7 years ago

Thanks for replying so quickly.

We're using CentOS 6.8 which has python-iniparse-0.3.1-2.1.el6.noarch installed. There are no updates in the standard repo.

Will look at getting this upgraded.