Update pylxd to look in snap path as well
This adds support for LXD being installed via snap
in addition to the traditional apt package.
Fixes
@@ -218,6 +218,9 @@ class Client(object):
if 'LXD_DIR' in os.environ:
path = os.path.join(
os.environ.get('LXD_DIR'), 'unix.socket')
+ else:
+ if os.path.exists('/var/snap/lxd/common/lxd/unix.socket'):
+ path = '/var/snap/lxd/common/lxd/unix.socket'
else:
path = '/var/lib/lxd/unix.socket'
self.api = _APINode('http+unix://{}'.format(
