~ubuntu-branches/ubuntu/trusty/landscape-client/trusty-proposed

« back to all changes in this revision

Viewing changes to landscape/sysinfo/deployment.py

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2010-04-07 16:27:45 UTC
  • mfrom: (1.1.14 upstream) (24.1.1 karmic-proposed)
  • Revision ID: james.westby@ubuntu.com-20100407162745-oeyoppvl0qyvii55
Tags: 1.5.0-0ubuntu0.10.04.0
* New upstream version (LP: #557244)
  - Fix package-changer running before smart-update has completed (LP: #542215)
  - Report the version of Eucalyptus used to generate topology data (LP: #554007)
  - Enable the Eucalyptus plugin by default, if supported (LP: #546531)
  - Use a whitelist of allowed filesystem types to instead of a blacklist (LP: #351927)
  - Report the update-manager logs to the server (LP: #503384)
  - Turn off Curl's DNS caching for requests. (LP: #522688)

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
                           % (plugin_name.lower(), plugin_name))()
61
61
                for plugin_name in plugins]
62
62
 
 
63
 
63
64
def get_landscape_log_directory(landscape_dir=None):
64
65
    """
65
66
    Work out the correct path to store logs in depending on the effective
79
80
    logger.propagate = False
80
81
    if not os.path.isdir(landscape_dir):
81
82
        os.mkdir(landscape_dir)
82
 
    log_filename = os.path.join(landscape_dir,  "sysinfo.log")
 
83
    log_filename = os.path.join(landscape_dir, "sysinfo.log")
83
84
    handler = RotatingFileHandler(log_filename,
84
85
                                  maxBytes=500 * 1024, backupCount=1)
85
86
    logger.addHandler(handler)
113
114
        done = Deferred()
114
115
        reactor.callWhenRunning(
115
116
            lambda: maybeDeferred(run_sysinfo).chainDeferred(done))
 
117
 
116
118
        def stop_reactor(result):
117
119
            # We won't need to use callLater here once we use Twisted >8.
118
120
            # tm:3011
119
121
            reactor.callLater(0, reactor.stop)
120
122
            return result
 
123
 
121
124
        done.addBoth(stop_reactor)
122
125
        reactor.run()
123
126
    else: