diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-10 16:53:17 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2013-01-22 09:29:42 (GMT) |
commit | 362cde17851010f1532373c48bbd262617d24fa7 (patch) | |
tree | edbc3a0476792182f03004851613456ffd266451 | |
parent | 891b21f66caf24d3f2bda75893f0e6fb4577249b (diff) |
Factor out cleanup_temporary files
To simplify a bit main
Acked-by: Simon Schampijer <simon@laptop.org>
-rwxr-xr-x | src/jarabe/main.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jarabe/main.py b/src/jarabe/main.py index 55d0496..a2444e0 100755 --- a/src/jarabe/main.py +++ b/src/jarabe/main.py @@ -173,7 +173,7 @@ def start_home(): def intro_window_done_cb(window): start_home() -def main(): +def cleanup_temporary_files(): try: from sugar3 import env # Remove temporary files. See http://bugs.sugarlabs.org/ticket/1876 @@ -185,6 +185,9 @@ def main(): # sugar from starting if (for example) the disk is full or read-only. print 'temporary files cleanup failed: %s' % e +def main(): + cleanup_temporary_files() + from sugar3 import logger # NOTE: This needs to happen so early because some modules register translatable # strings in the module scope. |