aboutsummaryrefslogtreecommitdiffstats
path: root/minidinstall
diff options
context:
space:
mode:
authorLibravatarChristoph Goehre <christoph.goehre@gmx.de>2007-12-10 10:22:15 +0100
committerLibravatarChristoph Goehre <christoph.goehre@gmx.de>2007-12-10 10:22:15 +0100
commited83fe28c74522097f9aa2bd885618397bb83fa6 (patch)
tree7c94feffe5d16f66aa81ed55e4de0afea12f9fbe /minidinstall
parent7359056c181777e040db8a0aa868550c8aa25bcd (diff)
use templates to generate success email
Diffstat (limited to 'minidinstall')
-rw-r--r--minidinstall/misc.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/minidinstall/misc.py b/minidinstall/misc.py
index eb52d00..e88f5a9 100644
--- a/minidinstall/misc.py
+++ b/minidinstall/misc.py
@@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-import os, errno, time
+import os, errno, time, string, re
def dup2(fd,fd2):
# dup2 with EBUSY retries (cf. dup2(2) and Debian bug #265513)
@@ -34,3 +34,14 @@ def dup2(fd,fd2):
# wait 0-2 seconds befor next try
time.sleep(tries)
tries += 1
+
+def format_changes(L):
+ """ remove changelog header and all lines with only a dot """
+
+ dotmatch = re.compile('^\.$')
+ L1 = []
+
+ for x in L[3:]:
+ L1.append(dotmatch.sub('', x))
+
+ return "\n".join(L1)