[lxc-devel] [pylxd/master] changed os.path.isfile() to os.path.exixsts in client.py
tanacca on Github
lxc-bot at linuxcontainers.org
Mon Jul 1 17:28:54 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 352 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190701/2b902aaf/attachment.bin>
-------------- next part --------------
From 403ef9fada01ae920225ae6bd8c1f6a7518ce389 Mon Sep 17 00:00:00 2001
From: Dario Mohaddes <m.dariuz at gmail.com>
Date: Mon, 1 Jul 2019 18:25:38 +0100
Subject: [PATCH] changed os.path.isfile() to os.path.exixsts in client.py
Signed-off-by: Dario Mohaddes <m.dariuz at gmail.com>
---
pylxd/client.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pylxd/client.py b/pylxd/client.py
index aa5118ca..5fe03044 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.exists(endpoint):
self.api = _APINode('http+unix://{}'.format(
parse.quote(endpoint, safe='')), timeout=timeout)
else:
More information about the lxc-devel
mailing list