If I run the code:
connection = manager.connect(\"I2Cx\")
The program crashes and reports a KeyError because I2Cx doesn\'t exist (it should be
You can also try to use get(), for example:
connection = manager.connect.get("I2Cx")
which won't raise a KeyError in case the key doesn't exist.
KeyError
You may also use second argument to specify the default value, if the key is not present.