Excerpts from Martin Abente's message of Mon Jul 05 19:49:10 +0000 2010: [src/sugar/bundle/activitybundle.py] > @@ -417,6 +418,10 @@ class ActivityBundle(Bundle): [...] > + profile_path = env.get_profile_path(self._bundle_id) > + if os.path.exists(profile_path): > + shutil.rmtree(profile_path) > + If the directory contains files or directories with mode 000 (unusual, but possible) or owned by somebody else (e.g. root) this will fail and throw an exception. You could use os.walk() + os.chmod() to handle the 000 case, though I'm unsure whether it's worth the effort. Passing ignore_errors=True to rmtree() to avoid breaking for any other reason is certainly a good idea, though. If you want to check whether rmtree() was successful, just check if profile_path still exists.
Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/
signature.asc
Description: PGP signature
_______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel