changeset 240:983e3a3a9b9e

Modified filename_function. imported from: moin--main--1.5--patch-243
author Alexander Schremmer <alex@alexanderweb.de.tla>
date Sun, 27 Nov 2005 11:13:33 +0000
parents 9ae17b303304
children 27757d338074
files MoinMoin/scripts/import/importIRCLogs.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/scripts/import/importIRCLogs.py	Fri Nov 25 21:15:21 2005 +0000
+++ b/MoinMoin/scripts/import/importIRCLogs.py	Sun Nov 27 11:13:33 2005 +0000
@@ -22,7 +22,9 @@
 base_page = 'MoinMoinChat/Logs/'
 
 # this function generates a pagename from the file name
-filename_function = lambda filename: '/'.join([x.replace('-', '/') for x in filename.split('.')][:-1])
+def filename_function(filename):
+    splitted = filename.split('.')
+    return '/'.join(splitted[0] + [x.replace('-', '/') for x in splitted[0:-1]])
 ### end of configuration
 
 import os, sys