I always forget that dp runs python 2.1...
authorDeryck Hodge <deryck@samba.org>
Fri, 22 Jul 2005 01:11:49 +0000 (01:11 +0000)
committerDeryck Hodge <deryck@samba.org>
Fri, 22 Jul 2005 01:11:49 +0000 (01:11 +0000)
This checks the string old-school style. :-)

deryck

git-svn-id: file:///home/svn/samba-web/trunk@753 44aeb9d7-1cd8-0310-b257-a505e0beeac2

scripts/updateNews.py

index abf72df167ae279373c7d3295cd5661ff14d8b58..d0867ccc3d5aecd28461cbcde4a7c5f98d947d34 100755 (executable)
@@ -221,7 +221,7 @@ for date in post_dates:
         link = re.search('(?<=\<div class=\"reference\">Link: \<a href=\"/samba/news/).+(?=\"\>)', item_text)
 
         # Drop end tag unless nested divs were used
-        if '<div' in text.group()[21:]:
+        if text.group()[21:].find('<div') == 0:
             description = text.group()[21:]
         else:
             description =  text.group()[21:-6]