summaryrefslogtreecommitdiff
path: root/boto/exception.py
diff options
context:
space:
mode:
authorMitch Garnaat <mitch@garnaat.com>2012-06-13 11:48:33 -0700
committerMitch Garnaat <mitch@garnaat.com>2012-06-13 11:48:33 -0700
commit34783053d1f0ce90822664b52bee1a2ca3654cd8 (patch)
treedf96392d3cc1da71c9a1144cfb3f524e1e4b8569 /boto/exception.py
parent924095d61a58535a81f8bc39c8fbde9e07985b2d (diff)
downloadboto-34783053d1f0ce90822664b52bee1a2ca3654cd8.tar.gz
Fixing a reference to ParseError in ElementTree that only works in Python 2.7.2.5.0
Diffstat (limited to 'boto/exception.py')
-rw-r--r--boto/exception.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/boto/exception.py b/boto/exception.py
index cc3526e1..b0987692 100644
--- a/boto/exception.py
+++ b/boto/exception.py
@@ -16,7 +16,7 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
@@ -29,6 +29,12 @@ import xml.sax
from boto import handler
from boto.resultset import ResultSet
+try:
+ from xml.etree.ElementTree import ParseError as XMLParseError
+except ImportError:
+ # In python2.6/5, xml.etree.ElementTree.ParseError does not exist.
+ from xml.parsers.expat import ExpatError as XMLParseError
+
class BotoClientError(StandardError):
"""
@@ -455,7 +461,7 @@ class ResumableTransferDisposition(object):
ABORT_CUR_PROCESS = 'ABORT_CUR_PROCESS'
# ABORT means the resumable transfer failed in a way that it does not
- # make sense to continue in the current process, and further that the
+ # make sense to continue in the current process, and further that the
# current tracker ID should not be preserved (in a tracker file if one
# was specified at resumable upload start time). If the user tries again
# later (e.g., a separate run of gsutil) it will get a new resumable