[Sugar-devel] [PATCH] fix journal scan of external media, dev.laptop.org #10140
James Cameron
quozl at laptop.org
Mon Dec 6 18:13:59 EST 2010
On Mon, Dec 06, 2010 at 10:05:43AM +0100, Simon Schampijer wrote:
> Small nitpick from me: use os.path.join instead of str methods to
> concatenate paths.
>
> self._pending_files.append(os.path.join(dir_path, entry))
Yes, I saw that too, but the existing code uses
for entry in dirs:
if entry.startswith('.'):
continue
full_path = dir_path + '/' + entry
and trying to change code unnecessarily is how defects are introduced,
as has already been seen.
I also don't like the idea of doing changes for portability unless they
can be tested on alternate platforms.
The same pattern occurs in extensions/cpsection/language/model.py,
src/jarabe/model/network.py, src/jarabe/model/shell.py, and
src/sugar/activity/activityservice.py if you'd like to change it.
Activities InfoSlicer, Read, and TamTam are also afflicted.
> For the patch title I would prefer something like "Make scanning of
> storage devices more robust OLPC #10140", is slightly more
> descriptive.
Right.
> Acked-By: Simon Schampijer <simon at laptop.org>
Thanks.
--
James Cameron
http://quozl.linux.org.au/
More information about the Sugar-devel
mailing list