diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2008-04-22 17:32:38 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2008-04-22 17:32:38 (GMT) |
commit | 84e2e2bd145b5693937ad7ff03839c6021e1d0db (patch) | |
tree | 7c8ba9fccfb47eb62d4caff1d9767e955532d24c | |
parent | 156bfd8fbe84a244082574becaa94cd9506b6f0c (diff) |
Correctly use tempfile.mkstemp().
-rw-r--r-- | sugar/activity/activity.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py index 0ce932c..6204354 100644 --- a/sugar/activity/activity.py +++ b/sugar/activity/activity.py @@ -661,8 +661,8 @@ class Activity(Window, gtk.Container): # TODO: Find a way of taking a png out of the pixbuf without saving # to a temp file. Impementing gtk.gdk.Pixbuf.save_to_buffer in pygtk # would solve this. - fd, file_path = tempfile.mkstemp('.png')[0] - fd.close() + fd, file_path = tempfile.mkstemp('.png') + os.close(fd) pixbuf.save(file_path, 'png') f = open(file_path) |