Mercurial > p > roundup > code
diff website/issues/detectors/userauditor.py @ 4632:4f25640b5521
Unified all copies of detectors/userauditor.py
The only functional change for the minimal and classic template is that the
error message for invalid addresses now contains the address that caused the
error. For the devel and website trackers the print command probably used
while debugging was removed. Everything else is comment and vim modeline.
| author | Thomas Arendsen Hein <thomas@intevation.de> |
|---|---|
| date | Fri, 01 Jun 2012 17:25:45 +0200 |
| parents | c2d0d3e9099d |
| children | ad1a337cb5b7 |
line wrap: on
line diff
--- a/website/issues/detectors/userauditor.py Wed May 16 15:21:08 2012 +0200 +++ b/website/issues/detectors/userauditor.py Fri Jun 01 17:25:45 2012 +0200 @@ -1,3 +1,24 @@ +# Copyright (c) 2003 Richard Jones (richard@mechanicalcat.net) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + import re # regular expression thanks to: http://www.regular-expressions.info/email.html @@ -37,7 +58,6 @@ for address in get_addresses(newvalues): if not valid_address(address): - print newvalues raise ValueError, 'Email address syntax is invalid "%s"'%address check_main = db.user.stringFind(address=address) @@ -69,3 +89,5 @@ # fire before changes are made db.user.audit('set', audit_user_fields) db.user.audit('create', audit_user_fields) + +# vim: sts=4 sw=4 et si
