svn commit: samba-web r303 - in trunk/scripts: .
tpot at samba.org
tpot at samba.org
Fri Sep 3 04:48:09 GMT 2004
Author: tpot
Date: 2004-09-03 04:48:09 +0000 (Fri, 03 Sep 2004)
New Revision: 303
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba-web&path=/trunk/scripts&rev=303&nolog=1
Log:
Some backward compatibility fixes to work with Python 2.1.
Change news dir to point to correct location.
Modified:
trunk/scripts/updateNews.py
Changeset:
Modified: trunk/scripts/updateNews.py
===================================================================
--- trunk/scripts/updateNews.py 2004-09-03 04:20:49 UTC (rev 302)
+++ trunk/scripts/updateNews.py 2004-09-03 04:48:09 UTC (rev 303)
@@ -15,7 +15,7 @@
import os, time
from stat import *
-top_dir = '/srv/www/htdocs/news' # set to news directory path
+top_dir = '/data/httpd/html/samba/news' # set to news directory path
not_news = ['.svn', 'images', 'style', 'calendar', 'index.html']
@@ -55,15 +55,15 @@
f_stats = os.stat(x)
f_date = time.strftime("%d %B %Y", time.localtime(f_stats[ST_MTIME]))
# group stories on the same date under that one date
- if f_date in topic_stories:
+ if f_date in topic_stories.keys():
topic_stories[f_date] += story
else:
topic_stories[f_date] = story
- for x in topic_stories:
+ for x in topic_stories.keys():
h2date = x
# again, group stories from same date under that date
- if h2date in all_stories:
+ if h2date in all_stories.keys():
all_stories[h2date] += topic_stories[h2date]
else:
all_stories[h2date] = topic_stories[h2date]
@@ -109,7 +109,7 @@
f_stats = os.stat(x)
f_date = time.strftime("%d %B %Y", time.localtime(f_stats[ST_MTIME]))
# group stories from same date under that one date
- if f_date in stories_by_date:
+ if f_date in stories_by_date.keys():
stories_by_date[f_date].append("".join(f_lines))
else:
stories_by_date[f_date] = f_lines
@@ -143,5 +143,5 @@
# Loop through each subdirectory, using function to create each index.html.
-for x in topics_files:
+for x in topics_files.keys():
archive(x, topics_files[x])
More information about the samba-cvs
mailing list