Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions zeroconf/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import socket
from zeroconf import ServiceBrowser, ServiceStateChange, Zeroconf
from subprocess import Popen, PIPE
import shlex
import xmltodict

__all__ = [
Expand Down Expand Up @@ -39,7 +40,7 @@ def connected_peers():
"""
peers = []

cli = Popen('gluster --xml pool list', shell=True, stdout=PIPE, stderr=PIPE)
cli = Popen(shlex.split('gluster --xml pool list', shell=False, stdout=PIPE, stderr=PIPE))
(out, err) = cli.communicate()
# TODO: catch errors (not even xml format when glusterd is not running)

Expand Down Expand Up @@ -80,7 +81,7 @@ def connected_peers():
def peer_probe(hostname):
""" Run 'gluster peer probe $hostname' against the given hostname (or IP).
"""
cli = Popen('gluster --xml peer probe %s' % hostname, shell=True, stdout=PIPE, stderr=PIPE)
cli = Popen(shlex.split('gluster --xml peer probe %s' % hostname, shell=False, stdout=PIPE, stderr=PIPE))
(out, err) = cli.communicate()

# TODO: catch errors
Expand Down
2 changes: 1 addition & 1 deletion zeroconf/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.0'
__version__ = '0.1.3'