|
18 | 18 | object supporting an execute() method that does the |
19 | 19 | actuall HTTP request. |
20 | 20 | """ |
| 21 | +from __future__ import absolute_import |
21 | 22 |
|
22 | 23 | __author__ = 'jcgregorio@google.com (Joe Gregorio)' |
23 | 24 |
|
|
28 | 29 | import httplib2 |
29 | 30 | import json |
30 | 31 | import logging |
31 | | -import mimeparse |
| 32 | +from . import mimeparse |
32 | 33 | import mimetypes |
33 | 34 | import os |
34 | 35 | import random |
|
42 | 43 | from email.mime.multipart import MIMEMultipart |
43 | 44 | from email.mime.nonmultipart import MIMENonMultipart |
44 | 45 | from email.parser import FeedParser |
45 | | -from errors import BatchError |
46 | | -from errors import HttpError |
47 | | -from errors import InvalidChunkSizeError |
48 | | -from errors import ResumableUploadError |
49 | | -from errors import UnexpectedBodyError |
50 | | -from errors import UnexpectedMethodError |
51 | | -from model import JsonModel |
| 46 | +from .errors import BatchError |
| 47 | +from .errors import HttpError |
| 48 | +from .errors import InvalidChunkSizeError |
| 49 | +from .errors import ResumableUploadError |
| 50 | +from .errors import UnexpectedBodyError |
| 51 | +from .errors import UnexpectedMethodError |
| 52 | +from .model import JsonModel |
52 | 53 | from oauth2client import util |
53 | 54 |
|
54 | 55 |
|
@@ -1330,7 +1331,7 @@ def execute(self, http=None): |
1330 | 1331 | if resp.status >= 300: |
1331 | 1332 | raise HttpError(resp, content, uri=request.uri) |
1332 | 1333 | response = request.postproc(resp, content) |
1333 | | - except HttpError, e: |
| 1334 | + except HttpError as e: |
1334 | 1335 | exception = e |
1335 | 1336 |
|
1336 | 1337 | if callback is not None: |
|
0 commit comments