[lxc-devel] [pylxd/master] changed os.path.isfile os.path.exists in client.py

tanacca on Github lxc-bot at linuxcontainers.org
Mon Jul 1 13:48:19 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 362 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190701/2c976b14/attachment.bin>
-------------- next part --------------
From 6a38560e5b9c8a84d60f0acef5d68f98d6f000d0 Mon Sep 17 00:00:00 2001
From: user <m.dariuz at gmail.com>
Date: Mon, 1 Jul 2019 14:46:25 +0100
Subject: [PATCH] changed os.path.isfile os.path.exists in client.py

---
 pylxd/client.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pylxd/client.py b/pylxd/client.py
index aa5118ca..ff4d982d 100644
--- a/pylxd/client.py
+++ b/pylxd/client.py
@@ -280,7 +280,7 @@ def __init__(
 
         self.cert = cert
         if endpoint is not None:
-            if endpoint.startswith('/') and os.path.isfile(endpoint):
+            if endpoint.startswith('/') and os.path.exist(endpoint):
                 self.api = _APINode('http+unix://{}'.format(
                     parse.quote(endpoint, safe='')), timeout=timeout)
             else:


More information about the lxc-devel mailing list