[Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394
Manuel Kaufmann
humitos at gmail.com
Wed Sep 12 07:50:32 EDT 2012
On Tue, Sep 11, 2012 at 10:27 PM, Martin Langhoff
<martin.langhoff at gmail.com> wrote:
> - During the webkit download -- most probable stage where you'll hit
> it. How does Webkit behave? Does Browse need to do anything?
I'm attaching an example that downloads a file with WebKit.
I tried it setting up a tmpfs with 1Mb as you suggested and aftert
that, I ran this script. WebKit tells us about the insufficient space
on the disk by raising the "error" signal. I catched it and I printed
the arguments of the signal:
'Error downloading URI code %s, detail %s: %s' % (err_code, err_detail, reason)
=== > Error downloading URI code 0, detail 1: Error writing to file:
No space left on device
err_detail: http://webkitgtk.org/reference/webkitgtk/stable/webkitgtk-webkitdownload.html#WebKitDownloadError
* WEBKIT_DOWNLOAD_ERROR_DESTINATION -> The download failed due to
disk write failure
I will keep taking a look at the other possibilities.
--
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: download_file_with_webkit.py
Type: application/octet-stream
Size: 1688 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120912/14a5eb2c/attachment.obj>
More information about the Sugar-devel
mailing list