~ubuntu-branches/ubuntu/trusty/python-docutils/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/rst2odt_prepstyles-elementtree.diff

  • Committer: Package Import Robot
  • Author(s): Dmitry Shachnev, Michael Schutte, Dmitry Shachnev
  • Date: 2013-08-07 19:44:34 UTC
  • Revision ID: package-import@ubuntu.com-20130807194434-f8oe02awkstonyr4
Tags: 0.11-1svn1
* Upload the current Subversion HEAD to fix autopkgtest failures.

[ Michael Schutte ]
* Document in the patch header that #714313 is also taken care of by
  odt-writer-ascii-filenames.diff.

[ Dmitry Shachnev ]
* Updated rst2odt_prepstyles-elementtree.diff to make it not cause
  SyntaxErrors with Python 3.
* Fix autopkgtest failures:
  - Copy HISTORY.txt to the testing directory.
  - Disable test_html4css1_misc as it does not work with our location
    of html4css1.css.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
Bug-Debian: http://bugs.debian.org/714319
5
5
Author: Michael Schutte <michi@debian.org>
6
6
Forwarded: https://sourceforge.net/p/docutils/patches/114/
7
 
Last-Update: 2013-08-05
 
7
Last-Update: 2013-08-06
8
8
 
9
9
--- a/tools/rst2odt_prepstyles.py
10
10
+++ b/tools/rst2odt_prepstyles.py
15
15
-from lxml import etree
16
16
+try:
17
17
+    from xml.etree import ElementTree as etree
18
 
+except ImportError, e:
 
18
+except ImportError:
19
19
+    try:
20
20
+        from elementtree import ElementTree as etree
21
 
+    except ImportError, e:
 
21
+    except ImportError:
22
22
+        raise ImportError('Missing an implementation of ElementTree. ' \
23
23
+                'Please install either Python >= 2.5 or ElementTree.')
24
24
+