This is an automatically generated e-mail. To reply, visit: http://reviewboard-fedoraserver.rhcloud.com/r/203/ |
Ship it!
config/roles/domaincontroller/role.py (Diff revision 3) | |||
---|---|---|---|
131 | # Initialize role |
133 | # Initialize role |
132 | def __init__(self, name, directory, *args, **kwargs): |
134 | def __init__(self, name, directory, *args, **kwargs): |
133 | super(Role, self).__init__(name, directory, *args, **kwargs) |
135 | super(Role, self).__init__(name, directory, *args, **kwargs) |
134 | 136 | ||
137 | # Add a compiled regular expression for testing domain validity |
||
138 | self.allowed_fqdn = re.compile(r"(?!-)[A-Z\d-]{1,63}(?<!-)$", re.IGNORECASE) |
I know this seems super-pedantic, but why not compile the regex once on the class level (if we want to optimize this point ;).
config/roles/domaincontroller/role.py (Diff revision 3) | |||
---|---|---|---|
318 | "{} is a local-only hostname".format(prop)) |
329 | "Invalid hostname: %s" % value) |
Some day I'll replace all old style string formatting with new-style calls to
.format()
, I swear. ;)
- Nils Philippsen
On September 2nd, 2015, 5:37 nachm. CEST, Stephen Gallagher wrote:
Review request for RoleKit Mailing List, Miloslav Trmac, Nils Philippsen, Stephen Gallagher, and Thomas Woerner.
By Stephen Gallagher.
Updated Sept. 2, 2015, 5:37 nachm.
Bugs:
43
Repository:
rolekit
Description
Testing
Diffs
|