> juju/providers/openstack/launch.py:95: hints =
> self._constraints["os-scheduler-hints"]
> Is this key guaranteed to be set? run_server does not assume it is
set, but the
> constraint is currently registered. However, the comments on that
registration
> muse that it might not be registered. Given the flow, maybe should
just be:
This does look a little confusing, but see
machine.constraints.Constraints.__getitem__ - a KeyError is raised only
if the constraint key name does not exist, and the pre-registered
default is returned if no constraint of that name was given.
On 2012/10/29 11:51:37, jimbaker wrote:
> juju/providers/ openstack/ launch. py:95: hints = ts["os- scheduler- hints"]
> self._constrain
> Is this key guaranteed to be set? run_server does not assume it is
set, but the
> constraint is currently registered. However, the comments on that
registration
> muse that it might not be registered. Given the flow, maybe should
just be:
> hints = self._constrain ts.get( "os-scheduler- hints")
This does look a little confusing, but see constraints. Constraints. __getitem_ _ - a KeyError is raised only
machine.
if the constraint key name does not exist, and the pre-registered
default is returned if no constraint of that name was given.
https:/ /codereview. appspot. com/6783059/