Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update config parser (deprecated) #57

Merged
merged 1 commit into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Release History
(`#52 <https://github.com/nengo/nengo-fpga/pull/52>`__)
- Throw an error with invalid config in ID script.
(`#53 <https://github.com/nengo/nengo-fpga/pull/53>`__)
- Update deprecated SafeConfigParser.
(`#57 <https://github.com/nengo/nengo-fpga/pull/57>`__)
- Remove unused seed from network builder.
(`#58 <https://github.com/nengo/nengo-fpga/pull/58>`__)
- Make all variable names lowercase.
Expand Down
6 changes: 3 additions & 3 deletions nengo_fpga/fpga_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
]


class _FPGA_CONFIG(configparser.SafeConfigParser):
class _FPGA_CONFIG(configparser.ConfigParser):
def __init__(self):
configparser.SafeConfigParser.__init__(self)
configparser.ConfigParser.__init__(self)
self.reload_config()

def _clear(self):
Expand All @@ -29,7 +29,7 @@ def _clear(self):
def read(self, filenames):
"""Read config file"""
logger.info("Reading FPGA configurations from {}".format(filenames))
return configparser.SafeConfigParser.read(self, filenames)
return configparser.ConfigParser.read(self, filenames)

def item_dict(self, section):
"""Organize config in a dictionary"""
Expand Down