summarylogtreecommitdiffstats
path: root/issue_166.patch
blob: a85c8b80edc8332f8b210b211d52ec3c515d79d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- GDriveFS-0.14.8_orig/gdrivefs/gdtool/chunked_download.py	2016-07-16 17:27:28.000000000 +0200
+++ GDriveFS-0.14.8/gdrivefs/gdtool/chunked_download.py	2016-11-10 15:58:06.000000000 +0100
@@ -2,7 +2,10 @@
 import time
 import random
 
-import oauth2client
+try:
+  from oauth2client import util
+except ImportError:
+  from oauth2client import _helpers as util
 import apiclient.http
 import apiclient.errors
 
@@ -19,7 +22,7 @@
     that needs to be downloaded (not a request object, which doesn't apply here).
     """
 
-    @oauth2client.util.positional(4)
+    @util.positional(4)
     def __init__(self, fd, http, uri, chunksize=DEFAULT_CHUNK_SIZE, start_at=0):
         """Constructor.
 
@@ -43,7 +46,7 @@
         self._sleep = time.sleep
         self._rand = random.random
 
-    @oauth2client.util.positional(1)
+    @util.positional(1)
     def next_chunk(self, num_retries=0):
         """Get the next chunk of the download.