[Sugar-devel] safer customization key (was Re: will the one true browse please stand up?)

Joshua N Pritikin jpritikin at pobox.com
Fri Jul 31 08:10:38 EDT 2009


On Fri, Jul 31, 2009 at 03:52:06PM +0545, Daniel Drake wrote:
> 2009/7/31 Joshua N Pritikin <jpritikin at pobox.com>:
> > That was not my experience. Where does the customization key code live
> > in GIT?
> 
> Here:
> http://dev.laptop.org/git/users/mstone/irfs-udebs/tree/src-olpc/init?h=unpack-bundles

Well, I'd feel a lot better if prior to the unzip you added something 
like:

  if ext == '.xo':
    dest_dir = re.sub(r'\-\d+\.xo$', '', f) + '.activity'
    shutil.rmtree(join(tgt['.xo'], dest_dir))

I know this does not work as written because the filename can (and often 
does) mismatch unzip's idea of the directory name. Any idea how to get 
directory prefix from the zip?


More information about the Sugar-devel mailing list