Thanks, pushed.<div><br></div><div>Gonzalo<br><br><div class="gmail_quote">On Fri, Jun 1, 2012 at 10:33 AM, Manuel Kaufmann <span dir="ltr"><<a href="mailto:humitos@gmail.com" target="_blank">humitos@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When the user creates a zipfile with the log collector utility, all<br>
his installed activities are listed in info.txt (inside the zipfile)<br>
and all the sugar logs of the session are attached.<br>
<br>
Signed-off-by: Manuel Kaufmann <<a href="mailto:humitos@gmail.com">humitos@gmail.com</a>><br>
---<br>
logcollect.py | 9 ++++++---<br>
1 file changed, 6 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/logcollect.py b/logcollect.py<br>
index 82c1bba..5d6e683 100644<br>
--- a/logcollect.py<br>
+++ b/logcollect.py<br>
@@ -230,10 +230,11 @@ class MachineProperties:<br>
<br>
def installed_activities(self):<br>
s = ''<br>
- for path in glob.glob('/usr/share/activities/*.activity'):<br>
+ for path in glob.glob('/usr/share/sugar/activities/*.activity'):<br>
s += os.path.basename(path) + '\n'<br>
<br>
- for path in glob.glob('/home/olpc/Activities/*'):<br>
+ home = os.path.expanduser('~')<br>
+ for path in glob.glob(os.path.join(home, 'Activities', '*')):<br>
s += '~' + os.path.basename(path) + '\n'<br>
<br>
return s<br>
@@ -295,7 +296,9 @@ class LogCollect:<br>
"logcollect: could not add %s: %s" % (fn, e))<br>
<br>
# Include all current ones from sugar/logs<br>
- for path in glob.glob('/home/olpc/.sugar/default/logs/*.log'):<br>
+ home = os.path.expanduser('~')<br>
+ for path in glob.glob(os.path.join(home, '.sugar', 'default',<br>
+ 'logs', '*.log')):<br>
try:<br>
if os.access(path, os.F_OK):<br>
if logbytes == 0:<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.10<br>
<br>
</font></span></blockquote></div><br></div>