Revision: 8955
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8955&view=rev
Author:   jouni
Date:     2011-02-07 16:42:17 +0000 (Mon, 07 Feb 2011)

Log Message:
-----------
Quick workaround for dviread bug #3175113

Modified Paths:
--------------
    branches/v1_0_maint/CHANGELOG
    branches/v1_0_maint/lib/matplotlib/dviread.py

Modified: branches/v1_0_maint/CHANGELOG
===================================================================
--- branches/v1_0_maint/CHANGELOG       2011-02-06 17:53:33 UTC (rev 8954)
+++ branches/v1_0_maint/CHANGELOG       2011-02-07 16:42:17 UTC (rev 8955)
@@ -1,3 +1,5 @@
+2011-02-07 Quick workaround for dviread bug #3175113 - JKS
+
 2011-01-04 Tag 1.0.1 for release at r8896
 
 2010-11-22 Fixed error with Hammer projection. - BVR

Modified: branches/v1_0_maint/lib/matplotlib/dviread.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/dviread.py       2011-02-06 17:53:33 UTC 
(rev 8954)
+++ branches/v1_0_maint/lib/matplotlib/dviread.py       2011-02-07 16:42:17 UTC 
(rev 8955)
@@ -714,22 +714,30 @@
         subsetting, but I have no example of << in my TeX installation.
         """
         texname, psname = words[:2]
-        effects, encoding, filename = '', None, None
+        effects, encodings, filename = '', [], None
         for word in words[2:]:
             if not word.startswith('<'):
                 effects = word
             else:
                 word = word.lstrip('<')
                 if word.startswith('['):
-                    assert encoding is None
-                    encoding = word[1:]
+                    encodings.append(word[1:])
                 elif word.endswith('.enc'):
-                    assert encoding is None
-                    encoding = word
+                    encodings.append(word)
                 else:
                     assert filename is None
                     filename = word
 
+        if len(encodings) > 1:
+            # TODO this is a stopgap workaround, need to handle this correctly
+            matplotlib.verbose.report('Multiple encodings for %s = %s, 
skipping'
+                                      % (texname, psname), 'debug')
+            return
+        elif len(encodings) == 1:
+            encoding, = encodings
+        else:
+            encoding = None
+
         eff = effects.split()
         effects = {}
         try:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to