Author: deryck Date: 2004-09-04 13:51:17 +0000 (Sat, 04 Sep 2004) New Revision: 314
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba-web&path=/trunk/scripts&rev=314&nolog=1 Log: Just simplifying the way a couple of lines are written. --deryck Modified: trunk/scripts/updateNews.py Changeset: Modified: trunk/scripts/updateNews.py =================================================================== --- trunk/scripts/updateNews.py 2004-09-04 13:13:38 UTC (rev 313) +++ trunk/scripts/updateNews.py 2004-09-04 13:51:17 UTC (rev 314) @@ -24,7 +24,7 @@ os.chdir(top_dir) topics = [] -for file in os.listdir(top_dir): +for file in os.listdir(os.curdir): if file in not_news: continue if os.path.isdir(file): topics.append(file) @@ -40,11 +40,10 @@ all_stories = {} for topic in topics: - cur_dir = top_dir + '/' + topic - os.chdir(cur_dir) + os.chdir(topic) topic_stories = {} - for file in os.listdir(cur_dir): + for file in os.listdir(os.curdir): if file in not_news: continue f_lines = open(file, 'r').readlines() story = "".join(f_lines) + '<div class="reference">Link: <a href="/samba/news/' + topic + '/#' + file[:-5] + '">' + topic + '/</a></div>\n\n'