~free.ekanayaka/landscape-client/jaunty-proposed

« back to all changes in this revision

Viewing changes to landscape/configuration.py

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2009-09-21 17:59:31 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090921175931-4ucv40j9ro26i3lm
Tags: 1.3.2.3-0ubuntu0.9.04.0
* New upstream release (LP: #347983):
  - Don't clear the hash_id_requests table upon resynchronize (LP #417122)
  - Include the README file in landscape-client (LP: #396260)
  - Fix client capturing stderr from run_command when constructing
    hash-id-databases url (LP: #397480)
  - Use substvars to conditionally depend on update-motd or
    libpam-modules (LP: #393454)
  - Fix reporting wrong version to the server (LP: #391225)
  - The init script does not wait for the network to be available
    before checking for EC2 user data (LP: #383336)
  - When the broker is restarted by the watchdog, the state of the client
    is inconsistent (LP: #380633)
  - Package stays unknown forever in the client with hash-id-databases
    support (LP: #381356)
  - Standard error not captured when calling smart-update (LP: #387441)
  - Changer calls reporter without switching groups, just user (LP: #388092)
  - Run smart update in the package-reporter instead of having a cronjob (LP: #362355)
  - Package changer does not inherit proxy settings (LP: #381241)
  - The ./test script doesn't work in landscape-client (LP: #381613)
  - The source package should build on all supported releases (LP: #385098)
  - Strip smart update's output (LP: #387331)
  - The fetch() timeout isn't based on activity (#389224)
  - Client can use a UUID of "None" when fetching the hash-id-database (LP: #381291)
  - Registration should use the fqdn rather than just the hostname (LP: #385730)

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
from ConfigParser import ConfigParser, Error as ConfigParserError
13
13
from StringIO import StringIO
14
14
 
15
 
import pycurl
16
 
 
17
15
from dbus.exceptions import DBusException
18
16
 
19
17
from landscape.sysvconfig import SysVConfig, ProcessError
20
18
from landscape.lib.dbus_util import (
21
19
    get_bus, NoReplyError, ServiceUnknownError, SecurityError)
22
20
from landscape.lib.twisted_util import gather_results
23
 
from landscape.lib.fetch import fetch, HTTPCodeError
 
21
from landscape.lib.fetch import fetch, FetchError
24
22
 
25
23
from landscape.broker.registration import InvalidCredentialsError
26
24
from landscape.broker.deployment import BrokerConfiguration
499
497
    error_message = None
500
498
    try:
501
499
        content = fetch(url)
502
 
    except pycurl.error, error:
503
 
        error_message = error.args[1]
504
 
    except HTTPCodeError, error:
 
500
    except FetchError, error:
505
501
        error_message = str(error)
506
502
    if error_message is not None:
507
503
        raise ImportOptionError(