summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2')
-rw-r--r--src/lib/Bcfg2/Client/Tools/MacPorts.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/MacPorts.py b/src/lib/Bcfg2/Client/Tools/MacPorts.py
index d768019a9..22f06ce9a 100644
--- a/src/lib/Bcfg2/Client/Tools/MacPorts.py
+++ b/src/lib/Bcfg2/Client/Tools/MacPorts.py
@@ -22,8 +22,12 @@ class MacPorts(Bcfg2.Client.Tools.PkgTool):
pkgcache = self.cmd.run("/opt/local/bin/port installed")[1]
self.installed = {}
for pkg in pkgcache:
+ if pkg.startswith("Warning:"):
+ continue
if pkg.startswith("The following ports are currently installed"):
continue
+ if pkg.startswith("No ports are installed"):
+ return
pkgname = pkg.split('@')[0].strip()
version = pkg.split('@')[1].split(' ')[0]
self.logger.info(" pkgname: %s version: %s" % (pkgname, version))