~roadmr/ubuntu/precise/checkbox/0.13.1

« back to all changes in this revision

Viewing changes to checkbox/application.py

  • Committer: Bazaar Package Importer
  • Author(s): Marc Tardif
  • Date: 2009-01-20 18:55:20 UTC
  • Revision ID: james.westby@ubuntu.com-20090120185520-s18m2hninrt53fki
Tags: 0.5
* New upstream version:
  * Added concept of hyper text view to display clickable links.
  * Added concept of properties to components.
  * Added pci information to launchpad report.
  * Added dmi information to launchpad report.
  * Added text area to keyboard test.
  * Removed sourcing of base postrm script.
  * Updated translations from Launchpad.
* Fixed handling of interrupt signal (LP: #327810)
* Fixed display of text in graphical interface (LP: #240374)
* Fixed support for regexes in blacklist and whitelist (LP: #327177)
* Fixed opening of subunit log file (LP: #325737)
* Fixed internet test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
 
# Copyright (c) 2008 Canonical
3
 
#
4
 
# Written by Marc Tardif <marc@interunion.ca>
5
 
#
6
2
# This file is part of Checkbox.
7
3
#
 
4
# Copyright 2008 Canonical Ltd.
 
5
#
8
6
# Checkbox is free software: you can redistribute it and/or modify
9
7
# it under the terms of the GNU General Public License as published by
10
8
# the Free Software Foundation, either version 3 of the License, or
29
27
 
30
28
from checkbox.contrib import bpickle_registry
31
29
 
 
30
from checkbox.lib.config import Config
32
31
from checkbox.lib.environ import get_variable
33
32
 
34
 
from checkbox.config import Config
35
33
from checkbox.plugin import PluginManager
36
34
from checkbox.reactor import Reactor
37
35
from checkbox.registry import RegistryManager
80
78
            logging.exception("Error running reactor.")
81
79
            raise
82
80
 
83
 
        self.plugin_manager.flush()
84
 
 
85
81
 
86
82
class ApplicationManager(object):
87
83
 
141
137
        config_file = posixpath.expanduser(args[1])
142
138
        config = Config(config_file, options.config)
143
139
 
 
140
        section_name = "checkbox/plugins/client_info"
 
141
        section = config.get_section(section_name)
 
142
        if not section:
 
143
            section = config.add_section(section_name)
 
144
        section.set("name", posixpath.basename(config.path) \
 
145
            .replace(".ini", ""))
 
146
        section.set("version", config.get_defaults().version)
 
147
 
144
148
        # Check options
145
149
        if options.version:
146
150
            print config.get_defaults().version