From ce253d3bd08a367e0adddbc5bb023c028e17d804 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Mon, 12 May 2003 05:44:12 +0000 Subject: nntpsplit(): Helper function. --- Mailman/Utils.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Mailman/Utils.py b/Mailman/Utils.py index ceb63f66b..4a644342c 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -360,6 +360,17 @@ def websafe(s): return cgi.escape(s, quote=1) +def nntpsplit(s): + parts = s.split(':', 1) + if len(parts) == 2: + try: + return parts[0], int(parts[1]) + except ValueError: + pass + # Use the defaults + return s, 119 + + # Just changing these two functions should be enough to control the way # that email address obscuring is handled. -- cgit v1.3.1