server: Rework methods to avoid mutable default arguments

Mutable objects as default arguments in function or method declarations
are only assigned once over the lifetime of the function declaration
(i.e. are not assigned per function/method *invocation*). Rework such
declarations to assign None (which is immutable), and test for None in
the function/method body to assign a per-instance object.

The side-effects of mutable default arguments are explored here:

http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments

Change-Id: Id963cdecba63f7072e621208e1a3173e1646ddf1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
1 file changed
tree: c1c449e5616aba55928e4bd07a5384353caf9293
  1. fail-monitor/
  2. libmapper/
  3. obmc/
  4. .gitignore
  5. bootstrap.sh
  6. configure.ac
  7. LICENSE
  8. Makefile.am
  9. phosphor-mapper
  10. README.md
  11. setup.cfg
  12. setup.py.in
README.md

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To clean the repository run `./bootstrap.sh clean`.