~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/externalcommand.py

Merge from integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
import os
23
23
import sys
 
24
 
24
25
from bzrlib.commands import Command
25
26
 
26
27
 
33
34
        bzrpath = os.environ.get('BZRPATH', '')
34
35
 
35
36
        for dir in bzrpath.split(os.pathsep):
 
37
            ## Empty directories are not real paths
 
38
            if not dir:
 
39
                continue
36
40
            path = os.path.join(dir, cmd)
37
41
            if os.path.isfile(path):
38
42
                return ExternalCommand(path)
43
47
    def __init__(self, path):
44
48
        self.path = path
45
49
 
46
 
 
 
50
 
47
51
    def name(self):
48
52
        return self.path.split(os.sep)[-1]
49
53