~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/ca_bundle.py

  • Committer: Alexander Belchenko
  • Date: 2007-02-26 20:28:08 UTC
  • mto: This revision was merged to the branch mainline in revision 2302.
  • Revision ID: bialix@ukr.net-20070226202808-9t3wvwmh172lw6br
Don't look in cwd for CA bundle (note from John)

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    #      3. Windows System directory (e.g. C:\windows\system32)
49
49
    #      4. Windows Directory (e.g. C:\windows)
50
50
    #      5. all directories along %PATH%
51
 
    # bialix: Windows directories usually listed in PATH env variable
 
51
    #
 
52
    # NOTES:
 
53
    #   bialix: Windows directories usually listed in PATH env variable
 
54
    #   j-a-meinel: bzr should not look in current working dir
52
55
 
53
56
    path = os.environ.get('CURL_CA_BUNDLE')
54
57
    if not path and sys.platform == 'win32':
55
 
        dirs = [os.path.realpath(os.path.dirname(sys.argv[0])),     # app dir
56
 
                os.getcwd()]                                        # cwd
 
58
        dirs = [os.path.realpath(os.path.dirname(sys.argv[0]))]     # app dir
57
59
        paths = os.environ.get('PATH')
58
60
        if paths:
59
 
            dirs.extend(paths.split(os.pathsep))
 
61
            paths = [i for i in paths.split(os.pathsep) if i]
 
62
            dirs.extend(paths)
60
63
        for d in dirs:
61
64
            fname = os.path.join(d, "curl-ca-bundle.crt")
62
65
            if os.path.isfile(fname):