Skip to content
Merged
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
13 changes: 11 additions & 2 deletions bin/queryserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@
# daemon script not supported on some platforms (windows?)
daemon_supported = False

def tryQuote(unquoted_input):
""" Python 2/3 compatibility hack
"""
try:
from shlex import quote as cmd_quote
except ImportError:
from pipes import quote as cmd_quote
return cmd_quote(unquoted_input)

import phoenix_queryserver_utils

phoenix_queryserver_utils.setPath()
Expand All @@ -68,8 +77,8 @@
if os.name == 'nt':
args = subprocess.list2cmdline(args)
else:
import pipes # pipes module isn't available on Windows
args = " ".join([pipes.quote(tryDecode(v)) for v in args])
# pipes module isn't available on Windows
args = " ".join([tryQuote(tryDecode(v)) for v in args])

# HBase configuration folder path (where hbase-site.xml reside) for
# HBase/Phoenix client side property override
Expand Down