This is an automatically generated e-mail. To reply, visit: http://reviewboard-fedoraserver.rhcloud.com/r/122/ |
src/rolekit/server/dbusrole.py (Diff revision 1) | |||
---|---|---|---|
def deploy(self, name, values, |
|||
299 | # limit role instances to 1 for now |
299 | # limit role instances to max instances either per role or globally |
300 | if len(self._instances) >= MAX_INSTANCES: |
300 | max_instances = MAX_INSTANCES |
301 | raise RolekitError(TOO_MANY_INSTANCES, "> 1") |
301 | if hasattr(self._role, "_MAX_INSTANCES"): |
302 | max_instances = self._role._MAX_INSTANCES |
||
303 | if len(self._instances) >= max_instances: |
||
304 | raise RolekitError(TOO_MANY_INSTANCES, "> %d" % max_instances) |
I think it makes more sense to set the _MAX_INSTANCES default value in RoleBase and then just allow the role implementations to override it if they want to. It seems less complex.
- Stephen Gallagher
On November 7th, 2014, 7:34 p.m. UTC, Thomas Woerner wrote:
Review request for RoleKit Mailing List, Miloslav Trmac, Stephen Gallagher, and Thomas Woerner.
By Thomas Woerner.
Updated Nov. 7, 2014, 7:34 p.m.
Repository:
rolekit
Description
Diffs
|