Coerce loglevel facet to int when updating
authorJeremy Stanley <fungi@yuggoth.org>
Thu, 15 Jun 2017 15:26:10 +0000 (15:26 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Thu, 15 Jun 2017 15:26:10 +0000 (15:26 +0000)
commitb18f66cbef4f215b1f3f6db239c21a4e07a8899e
tree8e46f2c6e1bd88b6dad7010b1169b6484bebe193
parent6dcab841e0b9632bce504932b9850125a4e5cc6d
Coerce loglevel facet to int when updating

Calling the set command always results in updating values to type
str, which can result in failures when those values are later
re-read. Explicitly coerce the loglevel value to int whenever it is
updated to avoid a subsequent exception when calling the show log
command.

This points out a need for maintaining a schema so that values can
be coerced to the appropriate type when needed, but for now the
conditional adjustment can serve as a placeholder for a more
thorough design.
mudpy/misc.py
mudpy/tests/selftest.py