From 82603bb2a0d8d6c39ba3ca10aedb1cae7172ac09 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 26 Aug 2015 09:28:23 -0400 Subject: [PATCH] avoids running abspath on None --- lib/ansible/inventory/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/inventory/__init__.py b/lib/ansible/inventory/__init__.py index e4ff5132d81..9f955ce94cb 100644 --- a/lib/ansible/inventory/__init__.py +++ b/lib/ansible/inventory/__init__.py @@ -576,7 +576,9 @@ class Inventory(object): if dname is None or dname == '' or dname == '.': cwd = os.getcwd() dname = cwd - return os.path.abspath(dname) + if dname: + dname = os.path.abspath(dname) + return dname def src(self): """ if inventory came from a file, what's the directory and file name? """