[scodoc-devel] [SVN] Scolar : [1672] Fixes for Debian 9 compatibility

eviennet at lipn.univ-paris13.fr eviennet at lipn.univ-paris13.fr
Lun 17 Juil 10:14:32 CEST 2017


Une pièce jointe HTML a été nettoyée...
URL: https://listes.univ-paris13.fr/pipermail/scodoc-devel/attachments/20170717/6320af60/attachment.htm 
-------------- section suivante --------------
Modified: branches/ScoDoc7/config/install_debian9.sh
===================================================================
--- branches/ScoDoc7/config/install_debian9.sh	2017-07-16 19:46:43 UTC (rev 1671)
+++ branches/ScoDoc7/config/install_debian9.sh	2017-07-17 08:14:32 UTC (rev 1672)
@@ -84,6 +84,7 @@
 
 # ------------ INSTALL DES EXTENSIONS PYTHON (2.7)
 
+apt-get -y install python-docutils
 apt-get -y install python-jaxml 
 apt-get -y install python-psycopg2 
 apt-get -y install python-pyrss2gen 
@@ -113,6 +114,8 @@
 (cd /tmp; tar xfz $SCODOC_DIR/config/softs/pydot-0.9.10.tar.gz)
 (cd /tmp/pydot-0.9.10;  $PYTHON setup.py install)
 
+# Fix dateutil:
+/opt/zope213/bin/pip install python-dateutil --upgrade
 
 # UNUSED BY ScoDoc 7:
 # SOFTS="$SCODOC_DIR/config/softs"

Modified: branches/ScoDoc7/gen_tables.py
===================================================================
--- branches/ScoDoc7/gen_tables.py	2017-07-16 19:46:43 UTC (rev 1671)
+++ branches/ScoDoc7/gen_tables.py	2017-07-17 08:14:32 UTC (rev 1672)
@@ -55,7 +55,7 @@
     for tag in tags:
         b = '<' + tag + '>'
         c = '</' + tag.split()[0] + '>'
-        L = [ b + x or '' + c for x in L ]
+        L = [ b + (x or '') + c for x in L ]
     return L
 
 class DEFAULT_TABLE_PREFERENCES:
@@ -441,7 +441,7 @@
         LINEWIDTH = 0.5
         #
         titles = [ '<para><b>%s</b></para>' % x for x in self.get_titles_list() ]
-        pdf_style_list = []
+        pdf_style_list = []        
         Pt = [ [Paragraph(SU(str(x)),CellStyle) for x in line ]
                for line in (self.get_data_list(pdf_mode=True, pdf_style_list=pdf_style_list,
                                                with_titles=True, omit_hidden_lines=True))]

Modified: branches/ScoDoc7/sco_bulletins_pdf.py
===================================================================
--- branches/ScoDoc7/sco_bulletins_pdf.py	2017-07-16 19:46:43 UTC (rev 1671)
+++ branches/ScoDoc7/sco_bulletins_pdf.py	2017-07-17 08:14:32 UTC (rev 1672)
@@ -104,7 +104,7 @@
     If format = 'html', replaces <para> by <p>. HTML does not allow logos. 
     """
     try:
-        text = field % WrapDict(cdict) # note that None values are mapped to empty strings
+        text = (field or '') % WrapDict(cdict) # note that None values are mapped to empty strings
     except:
         log('process_field: invalid format=%s' % field)
         text = '<para><i>format invalide !<i></para><para>' + traceback.format_exc() + '</para>'    


Plus d'informations sur la liste de diffusion scodoc-devel