diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2015-06-06 16:15:34 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2015-06-06 16:15:52 -0700 |
commit | eb9859ce750def63db8bc436338f94e875276a2e (patch) | |
tree | 878be9b1699b8e28f95a20652e31bd50755900c2 /lib | |
parent | 53feb12ea078cd9661eca2311fdbc18b352ddc37 (diff) | |
download | spack-eb9859ce750def63db8bc436338f94e875276a2e.tar.gz spack-eb9859ce750def63db8bc436338f94e875276a2e.tar.bz2 spack-eb9859ce750def63db8bc436338f94e875276a2e.tar.xz spack-eb9859ce750def63db8bc436338f94e875276a2e.zip |
Executables now have a useful __str__ function.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/util/executable.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index 6eede0f78e..1dcda0d87f 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -124,6 +124,11 @@ class Executable(object): return "<exe: %s>" % self.exe + def __str__(self): + return ' '.join(self.exe) + + + def which(name, **kwargs): """Finds an executable in the path like command-line which.""" path = kwargs.get('path', os.environ.get('PATH', '').split(os.pathsep)) |