~brian-murray/ubuntu/oneiric/apport/ubiquity-and-overrides

« back to all changes in this revision

Viewing changes to data/general-hooks/generic.py

  • Committer: Martin Pitt
  • Date: 2011-06-20 09:53:27 UTC
  • mfrom: (1369.34.121 trunk)
  • Revision ID: martin.pitt@canonical.com-20110620095327-p2b972x1old8oa88
new upstream release 1.21.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# Copyright (C) 2009 Canonical Ltd.
4
4
# Authors: Matt Zimmerman <mdz@canonical.com>
5
5
#          Martin Pitt <martin.pitt@ubuntu.com>
6
 
 
6
#          Brian Murray <brian@ubuntu.com>
 
7
#
7
8
# This program is free software; you can redistribute it and/or modify it
8
9
# under the terms of the GNU General Public License as published by the
9
10
# Free Software Foundation; either version 2 of the License, or (at your
19
20
        report['NonfreeKernelModules'] = ' '.join(nm)
20
21
 
21
22
    # check for low space
22
 
    mounts = { '/': 'system' }
 
23
    mounts = {'/': 'system',
 
24
              '/var': '/var',
 
25
             }
 
26
 
23
27
    home = os.getenv('HOME')
24
28
    if home:
25
29
        mounts[home] = 'home'
31
35
 
32
36
        if free_mb < treshold:
33
37
            report['UnreportableReason'] = 'Your %s partition has less than \
34
 
%s MB of free space available, which leads to a lot of problems. Please \
35
 
free some space.' % (mounts[mount], free_mb)
 
38
%s MB of free space available, which leads to problems using applications \
 
39
and installing updates. Please free some space.' % (mounts[mount], free_mb)
36
40
 
37
41
    # important glib errors/assertions (which should not have private data)
38
42
    if 'ExecutablePath' in report: