Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/logcollect.py
diff options
context:
space:
mode:
authorManuel Kaufmann <humitos@gmail.com>2012-06-01 13:31:35 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-06-01 13:40:08 (GMT)
commit38a19b7d942bf177e006499d1d54d65b41809e45 (patch)
treed45e363a71d76bf209e48ee167f85e9ed3328429 /logcollect.py
parent7a70ae21ed822d2f22835c4c014e06f80741c827 (diff)
Collector adds user's logs and activities SL #3240
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@gmail.com> Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'logcollect.py')
-rw-r--r--logcollect.py9
1 files 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: