From 4441d570ddf5f85b0dc97b3e0e25e7c0facaa265 Mon Sep 17 00:00:00 2001 From: James Cameron Date: Tue, 27 Jul 2010 05:42:00 +0000 Subject: ignore logging cleanup fail, sugarlabs.org #1720 laptop.org #9623 Reinstates a design feature that was in sugar-session last year that was removed during rework. This version of the patch is for backport to 0.84. --- diff --git a/bin/sugar-session b/bin/sugar-session index f5d4c6c..6826c7d 100644 --- a/bin/sugar-session +++ b/bin/sugar-session @@ -138,6 +138,12 @@ def set_fonts(): settings.set_property("gtk-font-name", "%s %f" % (face, size)) def main(): + try: + cleanup_logs() + except OSError, e: + # logs cleanup is not critical; it should not prevent sugar from + # starting if (for example) the disk is full or read-only. + print 'logs cleanup failed: %s' % e cleanup_logs() logger.start('shell') -- cgit v0.9.1