From 1994b5e6a959520274ae5e61cc106211d42a7fa0 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 8 May 2007 11:07:27 -0400 Subject: [PATCH 1/2] Fix file closing --- sugar/p2p/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sugar/p2p/network.py b/sugar/p2p/network.py index 504638a4..2270e165 100644 --- a/sugar/p2p/network.py +++ b/sugar/p2p/network.py @@ -92,7 +92,7 @@ class ChunkedGlibHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): if self._file: self._srcid = gobject.io_add_watch(self.wfile, gobject.IO_OUT | gobject.IO_ERR, self._send_next_chunk) else: - f.close() + self._file.close() self._cleanup() def _send_next_chunk(self, source, condition): From 28637c098ec6d95ede25cf050e90f64da176674f Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 8 May 2007 11:19:30 -0400 Subject: [PATCH 2/2] Fix activity creation ID collisions --- sugar/activity/activityfactory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sugar/activity/activityfactory.py b/sugar/activity/activityfactory.py index 06ab2807..3368b179 100644 --- a/sugar/activity/activityfactory.py +++ b/sugar/activity/activityfactory.py @@ -46,7 +46,7 @@ def create_activity_id(): found = False activities = pservice.get_activities() for act in activities: - if act_id == act.get_id(): + if act_id == act.props.id: found = True break if not found: