[Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394

Manuel Kaufmann humitos at gmail.com
Tue Sep 11 21:07:29 EDT 2012


On Tue, Sep 11, 2012 at 8:50 PM, Martin Langhoff
<martin.langhoff at gmail.com> wrote:
> mkdir /tmp/foo
> sudo mount -t tmpfs -o size=1M none /tmp/foo
>
> Now write there to a file in /tmp/foo to see what happens, exactly.

This is what I got:

[olpc at xo-07-30-50 ~]$ mkdir /tmp/foo
[olpc at xo-07-30-50 ~]$ sudo mount -t tmpfs -o size=1M none /tmp/foo
[olpc at xo-07-30-50 ~]$ python
Python 2.7.3 (default, Apr 30 2012, 23:07:00)
[GCC 4.7.0 20120416 (Red Hat 4.7.0-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> f = open('/tmp/foo/cooool.txt', 'w')
>>> f.write('w' * 200 ** 2)
(...)
>>> f.write('w' * 20000000)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 28] No space left on device
>>>

So, we should handle this exception inside the Journal Activity, when
an object is created or updated. How is the correct way that I have to
follow to inform about this exception to the other activities?

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/


More information about the Sugar-devel mailing list