library-web r421 - in trunk: . src
- From: fpeters svn gnome org
- To: svn-commits-list gnome org
- Subject: library-web r421 - in trunk: . src
- Date: Sat, 22 Mar 2008 12:05:14 +0000 (GMT)
Author: fpeters
Date: Sat Mar 22 12:05:13 2008
New Revision: 421
URL: http://svn.gnome.org/viewvc/library-web?rev=421&view=rev
Log:
* src/lgo.py: fixed check of figures existence, as it broke and had
insufficient fall-back behaviour for figures not in a figures/
directory (HIG has them in images/), also fixed fall-back behaviour
to work with images/ directory. (closes: #523785)
Modified:
trunk/ChangeLog
trunk/src/lgo.py
Modified: trunk/src/lgo.py
==============================================================================
--- trunk/src/lgo.py (original)
+++ trunk/src/lgo.py Sat Mar 22 12:05:13 2008
@@ -745,20 +745,24 @@
try:
doc_figures = re.findall('DOC_FIGURES\s+=\s+(.*)',
self.makefile_am)[0].split()
- figures_dirname = os.path.join(ext_dirname, self.dirname, 'C', 'figures')
+ figures_dirname = os.path.join(ext_dirname, self.dirname, 'C')
for doc_figure in doc_figures:
- if not os.path.exists(os.path.join(ext_dirname, self.dirname, doc_figure)):
+ if not os.path.exists(os.path.join(figures_dirname, doc_figure)):
logging.warning('figure (%s) listed but not present, going to autodiscover' % \
doc_figure)
raise IndexError()
except IndexError:
figures_dirname = os.path.join(ext_dirname, self.dirname, 'C', 'figures')
+ images_dirname = os.path.join(ext_dirname, self.dirname, 'C', 'images')
+ doc_figures = []
if os.path.exists(figures_dirname):
- doc_figures = [os.path.join('figures', x) for x in \
+ doc_figures += [os.path.join('figures', x) for x in \
os.listdir(figures_dirname) \
if os.path.splitext(x)[1] in ('.png', '.jpg', '.jpeg')]
- else:
- doc_figures = []
+ if os.path.exists(images_dirname):
+ doc_figures += [os.path.join('images', x) for x in \
+ os.listdir(images_dirname) \
+ if os.path.splitext(x)[1] in ('.png', '.jpg', '.jpeg')]
doc_linguas.sort()
if app.config.languages:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]