Changeset 3054
- Timestamp:
- 02/13/08 23:58:56 (10 months ago)
- Files:
-
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/fileop.py (modified) (7 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/mkcol.py (modified) (3 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/propfind.py (modified) (4 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/proppatch.py (modified) (7 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/report.py (modified) (1 diff)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/report_expand.py (modified) (3 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/fileupload.py (modified) (6 diffs)
- ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/stream.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/fileop.py
r3053 r3054 205 205 yield response 206 206 try: 207 response = response.get _result()207 response = response.getResult() 208 208 finally: 209 209 source_stream.close() … … 220 220 response = waitForDeferred(delete(destination_uri, destination_filepath)) 221 221 yield response 222 response = response.get _result()222 response = response.getResult() 223 223 checkResponse(response, "delete", responsecode.NO_CONTENT) 224 224 success_code = responsecode.NO_CONTENT … … 287 287 response = waitForDeferred(copy(FilePath(source_path), FilePath(destination_path), destination_uri, depth)) 288 288 yield response 289 response = response.get _result()289 response = response.getResult() 290 290 checkResponse(response, "copy", responsecode.NO_CONTENT) 291 291 … … 358 358 response = waitForDeferred(delete(destination_uri, destination_filepath)) 359 359 yield response 360 response = response.get _result()360 response = response.getResult() 361 361 checkResponse(response, "delete", responsecode.NO_CONTENT) 362 362 … … 384 384 response = waitForDeferred(copy(source_filepath, destination_filepath, destination_uri, depth)) 385 385 yield response 386 response = response.get _result()386 response = response.getResult() 387 387 checkResponse(response, "copy", responsecode.CREATED, responsecode.NO_CONTENT) 388 388 389 389 response = waitForDeferred(delete(source_uri, source_filepath)) 390 390 yield response 391 response = response.get _result()391 response = response.getResult() 392 392 checkResponse(response, "delete", responsecode.NO_CONTENT) 393 393 … … 435 435 response = waitForDeferred(delete(uri, filepath)) 436 436 yield response 437 response = response.get _result()437 response = response.getResult() 438 438 checkResponse(response, "delete", responsecode.NO_CONTENT) 439 439 … … 457 457 x = waitForDeferred(readIntoFile(stream, resource_file)) 458 458 yield x 459 x.get _result()459 x.getResult() 460 460 except: 461 461 raise HTTPError(statusForFailure( ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/mkcol.py
r3053 r3054 43 43 parent = waitForDeferred(request.locateResource(parentForURL(request.uri))) 44 44 yield parent 45 parent = parent.get _result()45 parent = parent.getResult() 46 46 47 47 if self.fp.exists(): … … 72 72 yield x 73 73 try: 74 x.get _result()74 x.getResult() 75 75 except ValueError, e: 76 76 log.err("Error while handling MKCOL body: %s" % (e,)) … … 79 79 response = waitForDeferred(mkcollection(self.fp)) 80 80 yield response 81 yield response.get _result()81 yield response.getResult() 82 82 83 83 http_MKCOL = deferredGenerator(http_MKCOL) ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/propfind.py
r3053 r3054 54 54 doc = waitForDeferred(davXMLFromStream(request.stream)) 55 55 yield doc 56 doc = doc.get _result()56 doc = doc.getResult() 57 57 except ValueError, e: 58 58 log.err("Error while handling PROPFIND body: %s" % (e,)) … … 108 108 resource_properties = waitForDeferred(resource.listProperties(request)) 109 109 yield resource_properties 110 resource_properties = resource_properties.get _result()110 resource_properties = resource_properties.getResult() 111 111 112 112 if search_properties is "names": … … 123 123 properties_to_enumerate = waitForDeferred(resource.listAllprop(request)) 124 124 yield properties_to_enumerate 125 properties_to_enumerate = properties_to_enumerate.get _result()125 properties_to_enumerate = properties_to_enumerate.getResult() 126 126 else: 127 127 properties_to_enumerate = search_properties … … 132 132 resource_property = waitForDeferred(resource.readProperty(property, request)) 133 133 yield resource_property 134 resource_property = resource_property.get _result()134 resource_property = resource_property.getResult() 135 135 except: 136 136 f = Failure() ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/proppatch.py
r3053 r3054 53 53 doc = waitForDeferred(davXMLFromStream(request.stream)) 54 54 yield doc 55 doc = doc.get _result()55 doc = doc.getResult() 56 56 except ValueError, e: 57 57 log.err("Error while handling PROPPATCH body: %s" % (e,)) … … 97 97 has = waitForDeferred(self.hasProperty(property, request)) 98 98 yield has 99 has = has.get _result()99 has = has.getResult() 100 100 101 101 if has: 102 102 oldProperty = waitForDeferred(self.readProperty(property, request)) 103 103 yield oldProperty 104 oldProperty.get _result()104 oldProperty.getResult() 105 105 106 106 def undo(): … … 113 113 x = waitForDeferred(action(property, request)) 114 114 yield x 115 x.get _result()115 x.getResult() 116 116 except ValueError, e: 117 117 # Convert ValueError exception into HTTPError … … 141 141 ok = waitForDeferred(do(self.writeProperty, property)) 142 142 yield ok 143 ok = ok.get _result()143 ok = ok.getResult() 144 144 if not ok: 145 145 gotError = True … … 148 148 ok = waitForDeferred(do(self.removeProperty, property)) 149 149 yield ok 150 ok = ok.get _result()150 ok = ok.getResult() 151 151 if not ok: 152 152 gotError = True … … 164 164 x = waitForDeferred(action()) 165 165 yield x 166 x.get _result()166 x.getResult() 167 167 raise 168 168 … … 175 175 x = waitForDeferred(action()) 176 176 yield x 177 x.get _result()177 x.getResult() 178 178 responses.error() 179 179 ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/report.py
r3053 r3054 54 54 doc = waitForDeferred(davXMLFromStream(request.stream)) 55 55 yield doc 56 doc = doc.get _result()56 doc = doc.getResult() 57 57 except ValueError, e: 58 58 log.err("Error while handling REPORT body: %s" % (e,)) ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/dav/method/report_expand.py
r3053 r3054 62 62 all_properties = waitForDeferred(self.listAllProp(request)) 63 63 yield all_properties 64 all_properties = all_properties.get _result()64 all_properties = all_properties.getResult() 65 65 66 66 for all_property in all_properties: … … 80 80 my_properties = waitForDeferred(self.listProperties(request)) 81 81 yield my_properties 82 my_properties = my_properties.get _result()82 my_properties = my_properties.getResult() 83 83 84 84 if property in my_properties: … … 86 86 value = waitForDeferred(self.readProperty(property, request)) 87 87 yield value 88 value = value.get _result()88 value = value.getResult() 89 89 90 90 if isinstance(value, davxml.HRef): ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/fileupload.py
r3053 r3054 51 51 line = defer.waitForDeferred(line) 52 52 yield line 53 line = line.get _result()53 line = line.getResult() 54 54 #print "GOT", line 55 55 if not line.endswith('\r\n'): … … 177 177 line = defer.waitForDeferred(line) 178 178 yield line 179 line = line.get _result()179 line = line.getResult() 180 180 if line != self.boundary + '\r\n': 181 181 raise MimeFormatError("Extra data before first boundary: %r looking for: %r" % (line, self.boundary + '\r\n')) … … 192 192 line = defer.waitForDeferred(line) 193 193 yield line 194 line = line.get _result()194 line = line.getResult() 195 195 196 196 if line == "--\r\n": … … 255 255 datas = defer.waitForDeferred(datas) 256 256 yield datas 257 datas = datas.get _result()257 datas = datas.getResult() 258 258 if datas is None: 259 259 break … … 276 276 x = defer.waitForDeferred(x) 277 277 yield x 278 x = x.get _result()278 x = x.getResult() 279 279 if filename is None: 280 280 # Is a normal form field … … 345 345 datas = defer.waitForDeferred(datas) 346 346 yield datas 347 datas = datas.get _result()347 datas = datas.getResult() 348 348 if datas is None: 349 349 break ipython1/branches/ipython1-client-r3021/ipython1/external/twisted/web2/stream.py
r3053 r3054 975 975 if isinstance(newdata, defer.Deferred): 976 976 newdata = defer.waitForDeferred(newdata) 977 yield newdata; newdata = newdata.get _result()977 yield newdata; newdata = newdata.getResult() 978 978 979 979 if newdata is None:
