~landscape/smart/staging

« back to all changes in this revision

Viewing changes to smart/plugins/landscape.py

  • Committer: Andreas Hasenack
  • Date: 2009-03-04 18:50:13 UTC
  • mfrom: (818.6.14 trunk)
  • mto: This revision was merged to the branch mainline in revision 837.
  • Revision ID: andreas@canonical.com-20090304185013-5nwi2uyzitzic8yv
Merge latest fixes from trunk for the proxy environment variable handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
        parser = ConfigParser()
35
35
        parser.read(CLIENT_CONF_PATH)
36
36
        for type in "http", "https", "ftp":
37
 
            if parser.has_option("client", "%s_proxy" % type):
38
 
                setting = parser.get("client", "%s_proxy" % type)
39
 
                sysconf.set("%s-proxy" % type, setting, weak=True)
 
37
            option = "%s_proxy" % type
 
38
            if parser.has_option("client", option) and option not in os.environ:
 
39
                setting = parser.get("client", option)
 
40
                sysconf.set(option.replace("_", "-"), setting, weak=True)
40
41
 
41
42
 
42
43
run()