~ubuntu-core-dev/update-notifier/ubuntu

« back to all changes in this revision

Viewing changes to data/hooks.py

  • Committer: Michael Vogt
  • Date: 2010-08-23 08:58:54 UTC
  • Revision ID: michael.vogt@ubuntu.com-20100823085854-of564qzcwzhnap4t
apply xdg patches by Sebastian Geiger, many thanks

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 
43
43
    def _readSeenFile(self):
44
44
        """ read the users config file that stores what hook files are
45
 
            already seen """
46
 
        hooks_seen = user.home+"/.update-notifier/hooks_seen"
 
45
            already seen
 
46
        """
 
47
        data_home = os.getenv("XDG_CONFIG_HOME", os.path.join(user.home, '.config'))
 
48
        hooks_seen = os.path.join(data_home, 'update-notifier', 'hooks_seen')
47
49
        if os.path.exists(hooks_seen):
48
50
            for line in open(hooks_seen):
49
51
                filename, mtime, cmd_run = string.split(line)