Commits

Gary Oberbrunner committed 7b43830

update-release-info: fixed date updating for doc/user/main.xml.

Also added note that doc/user/main.in is no longer needed/used
and prevent that from stopping the doc gen process.

Comments (0)

Files changed (1)

bin/update-release-info.py

 # Update doc/user/main.{in,xml}
 
 docyears = ', '.join(map(str, iter(range(2004, release_date[0] + 1))))
-t = UpdateFile(os.path.join('doc', 'user', 'main.in'))
-if DEBUG: t.file = '/tmp/main.in'
-## TODO debug these
-#t.sub('<pubdate>[^<]*</pubdate>', '<pubdate>' + docyears + '</pubdate>')
-#t.sub('<year>[^<]*</year>', '<year>' + docyears + '</year>')
+if os.path.exists(os.path.join('doc', 'user', 'main.in')):
+    # this is no longer used as of Dec 2013
+    t = UpdateFile(os.path.join('doc', 'user', 'main.in'))
+    if DEBUG: t.file = '/tmp/main.in'
+    ## TODO debug these
+    #t.sub('<pubdate>[^<]*</pubdate>', '<pubdate>' + docyears + '</pubdate>')
+    #t.sub('<year>[^<]*</year>', '<year>' + docyears + '</year>')
 
 t = UpdateFile(os.path.join('doc', 'user', 'main.xml'))
 if DEBUG: t.file = '/tmp/main.xml'
-## TODO debug these
-#t.sub('<pubdate>[^<]*</pubdate>', '<pubdate>' + docyears + '</pubdate>')
-#t.sub('<year>[^<]*</year>', '<year>' + docyears + '</year>')
+t.sub('<pubdate>[^<]*</pubdate>', '<pubdate>' + docyears + '</pubdate>')
+t.sub('<year>[^<]*</year>', '<year>' + docyears + '</year>')
 
 # Write out the last update