ssato / python-anyconfig

Python library provides common APIs to load and dump configuration files in various formats
MIT License
279 stars 31 forks source link

Do not use assert in main application code #15

Closed Grokzen closed 9 years ago

Grokzen commented 9 years ago

Hi.

While looking through merge strategies i found that you are using asserts in the main application code https://github.com/ssato/python-anyconfig/blob/master/anyconfig/api.py#L131

It would look wierd if i ran the code and i got a assertion error when not running the tests. It should either return with some error code or raise a custom exception.

ssato commented 9 years ago

Absolutely right. I forgot to remove these assertions. Thanks a lot for your report and suggestions!

I guess the last commit #2cea91a9ad may be an answer for this issue. So, could you please take a loot at it?

Grokzen commented 9 years ago

The commit looks greak :]