[Sugar-devel] [PATCH] fix journal scan of external media, dev.laptop.org #10140

Simon Schampijer simon at schampijer.de
Tue Dec 7 05:00:14 EST 2010


On 12/07/2010 12:13 AM, James Cameron wrote:
> 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.

Ok, patches welcome :)

>> 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.
>

Great, can you please push it? /me wants to do a new 0.84 release.

Regards,
    Simon


More information about the Sugar-devel mailing list