[Sugar-devel] [PATCH Log] Collector adds user's logs and activities SL #3240
Gonzalo Odiard
gonzalo at laptop.org
Fri Jun 1 10:33:05 EDT 2012
Thanks, pushed.
Gonzalo
On Fri, Jun 1, 2012 at 10:33 AM, Manuel Kaufmann <humitos at gmail.com> wrote:
> When the user creates a zipfile with the log collector utility, all
> his installed activities are listed in info.txt (inside the zipfile)
> and all the sugar logs of the session are attached.
>
> Signed-off-by: Manuel Kaufmann <humitos at gmail.com>
> ---
> logcollect.py | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/logcollect.py b/logcollect.py
> index 82c1bba..5d6e683 100644
> --- a/logcollect.py
> +++ b/logcollect.py
> @@ -230,10 +230,11 @@ class MachineProperties:
>
> def installed_activities(self):
> s = ''
> - for path in glob.glob('/usr/share/activities/*.activity'):
> + for path in glob.glob('/usr/share/sugar/activities/*.activity'):
> s += os.path.basename(path) + '\n'
>
> - for path in glob.glob('/home/olpc/Activities/*'):
> + home = os.path.expanduser('~')
> + for path in glob.glob(os.path.join(home, 'Activities', '*')):
> s += '~' + os.path.basename(path) + '\n'
>
> return s
> @@ -295,7 +296,9 @@ class LogCollect:
> "logcollect: could not add %s: %s" %
> (fn, e))
>
> # Include all current ones from sugar/logs
> - for path in
> glob.glob('/home/olpc/.sugar/default/logs/*.log'):
> + home = os.path.expanduser('~')
> + for path in glob.glob(os.path.join(home, '.sugar',
> 'default',
> + 'logs', '*.log')):
> try:
> if os.access(path, os.F_OK):
> if logbytes == 0:
> --
> 1.7.10
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120601/ae2ebe12/attachment-0001.html>
More information about the Sugar-devel
mailing list