This is an automatically generated e-mail. To reply, visit: http://reviewboard-fedoraserver.rhcloud.com/r/196/ |
On August 26th, 2015, 2:09 p.m. UTC, Stephen Gallagher wrote:
src/rolekit/server/io/rolesettings.py (Diff revision 1) 52 if name in self._callbacks:53 self._callbacks[signal] = (handler, args)54 else:55 raise ValueError("Unknown signal name '%s'" % name)Wouldn't it be more "pythonic" to do:
try: self._callbacks[signal] = (handler, args) except KeyError: raise ValueError("Unknown signal name '%s'" % name)On August 26th, 2015, 2:16 p.m. UTC, Thomas Woerner wrote:
This would allow to set a handler for unsupported and never called signals like "foo" also.
Ah, you are right of course. I was a little mixed up there.
- Stephen
On August 26th, 2015, 1:21 p.m. UTC, Thomas Woerner wrote:
Review request for RoleKit Mailing List, Miloslav Trmac, Nils Philippsen, Stephen Gallagher, and Thomas Woerner.
By Thomas Woerner.
Updated Aug. 26, 2015, 1:21 p.m.
Repository:
rolekit
Description
Diffs
|