[Sugar-devel] [PATCH sugar 04/20] Factor out cleanup_temporary files
Daniel Narvaez
dwnarvaez at gmail.com
Mon Dec 10 14:11:30 EST 2012
From: Daniel Narvaez <dwnarvaez at gmail.com>
To simplify a bit main
---
src/jarabe/main.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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.
--
1.7.10.4
More information about the Sugar-devel
mailing list