]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-daemon: fix pathify (fix shell --config/--keyring)
authorSage Weil <sage@redhat.com>
Fri, 25 Oct 2019 02:25:59 +0000 (21:25 -0500)
committerSage Weil <sage@redhat.com>
Fri, 25 Oct 2019 02:25:59 +0000 (21:25 -0500)
The relative path works on one of my machines but not my laptop; the
full CWD works everywhere.  This is presumably better anyway!

Signed-off-by: Sage Weil <sage@redhat.com>
src/ceph-daemon

index 6d64d9c740c9def720faa8758af8467763f25ea7..4d079199bec71c332f3960768770bebe7dd00ceb 100755 (executable)
@@ -147,8 +147,8 @@ def call_throws(command, **kwargs):
 ##################################
 
 def pathify(p):
-    if '/' not in p:
-        return './' + p
+    if not p.startswith('/'):
+        return os.path.join(os.getcwd(), p)
     return p
 
 def get_hostname():