diff --git a/asadm-deps/deb/jsonschema/install.sh b/asadm-deps/deb/jsonschema/install.sh deleted file mode 100755 index 834c289e..00000000 --- a/asadm-deps/deb/jsonschema/install.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018-2021 Aerospike, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ - -PYMODULE=jsonschema - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -if ! command_exists pip ; then - echo Installing python-dev - apt-get install -y python-dev - - echo Installing python-setuptools - apt-get install -y python-setuptools - - echo Installing pip - apt-get install python-pip - - if ! command_exists pip ; then - echo "Error while installing pip. Please install pip and run this installation again." - exit 1 - fi -fi - -echo Installing ${PYMODULE} -pip install --upgrade ${PYMODULE} diff --git a/asadm-deps/deb/pyOpenSSL/install.sh b/asadm-deps/deb/pyOpenSSL/install.sh deleted file mode 100755 index cf213902..00000000 --- a/asadm-deps/deb/pyOpenSSL/install.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2013-2017 Aerospike, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ - -PYMODULE=pyOpenSSL - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -if ! command_exists pip ; then - echo Installing python-dev - apt-get install -y python-dev - - echo Installing python-setuptools - apt-get install -y python-setuptools - - echo Installing pip - apt-get install python-pip - - if ! command_exists pip ; then - echo "Error while installing pip. Please install pip and run this installation again." - exit 1 - fi -fi - -echo Installing build-essential libssl-dev libffi-dev -apt-get install build-essential libssl-dev libffi-dev - -echo Installing ${PYMODULE} -pip install --upgrade ${PYMODULE} diff --git a/asadm-deps/deb/pyasn1/install.sh b/asadm-deps/deb/pyasn1/install.sh deleted file mode 100755 index e2682a20..00000000 --- a/asadm-deps/deb/pyasn1/install.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2013-2017 Aerospike, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ - -PYMODULE=pyasn1 - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -if ! command_exists pip ; then - echo Installing python-dev - apt-get install -y python-dev - - echo Installing python-setuptools - apt-get install -y python-setuptools - - echo Installing pip - apt-get install python-pip - - if ! command_exists pip ; then - echo "Error while installing pip. Please install pip and run this installation again." - exit 1 - fi -fi - -echo Installing ${PYMODULE} -pip install --upgrade ${PYMODULE} diff --git a/asadm-deps/deb/python-pexpect/install.sh b/asadm-deps/deb/python-pexpect/install.sh deleted file mode 100755 index a114c6aa..00000000 --- a/asadm-deps/deb/python-pexpect/install.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env bash -################################################################################ - -PYMODULE=pexpect - -PACKAGE=python-pexpect - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -python < /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) - -python < /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -if ! command_exists pip ; then - echo Installing python-dev - apt-get install -y python-dev - - echo Installing python-setuptools - apt-get install -y python-setuptools - - echo Installing pip - apt-get install python-pip - - if ! command_exists pip ; then - echo "Error while installing pip. Please install pip and run this installation again." - exit 1 - fi -fi - -echo Installing ${PYMODULE} -pip install --upgrade ${PYMODULE} diff --git a/asadm-deps/deb/zip/install.sh b/asadm-deps/deb/zip/install.sh deleted file mode 100755 index c2ee7abf..00000000 --- a/asadm-deps/deb/zip/install.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2013-2017 Aerospike, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -if ! command_exists zip ; then - echo Installing zip - apt-get install zip - - if ! command_exists zip ; then - echo "Error while installing zip. Please install zip and run this installation again." - exit 1 - fi -fi \ No newline at end of file diff --git a/asadm-deps/install.sh b/asadm-deps/install.sh deleted file mode 100755 index 7519a9a3..00000000 --- a/asadm-deps/install.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2013-2017 Aerospike, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -lowercase(){ - echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/" -} - -OS=`lowercase \`uname\`` -DISTRO="UNKNOWN" - -if [ "$OS" == "darwin" ]; then - DISTRO="mac" -elif [ "$OS" == "linux" ]; then - if [ -f /etc/redhat-release ] ; then - DISTRO="rpm" - elif [ -f /etc/debian_version ] ; then - DISTRO="deb" - elif [ -f /etc/system-release ] ; then - DISTRO="rpm" - fi -else - echo "No support to OS {$OS}" - exit 1 -fi - -DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) - -for dep in $(cd ${DIR}/${DISTRO} && ls | grep -v install.sh); do - if [ -x ${DIR}/${DISTRO}/${dep}/install.sh ]; then - ${DIR}/${DISTRO}/${dep}/install.sh - fi -done \ No newline at end of file diff --git a/asadm-deps/mac/jsonschema/install.sh b/asadm-deps/mac/jsonschema/install.sh deleted file mode 100755 index 95c83450..00000000 --- a/asadm-deps/mac/jsonschema/install.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018-2021 Aerospike, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ - -PYMODULE=jsonschema - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -if ! command_exists pip ; then - echo Installing pip - easy_install pip - - if ! command_exists pip ; then - echo "Error while installing pip. Please install pip and run this installation again." - exit 1 - fi -fi -echo Installing ${PYMODULE} -pip install ${PYMODULE} --upgrade diff --git a/asadm-deps/mac/pyOpenSSL/install.sh b/asadm-deps/mac/pyOpenSSL/install.sh deleted file mode 100755 index 45a633a2..00000000 --- a/asadm-deps/mac/pyOpenSSL/install.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2013-2017 Aerospike, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ - -PYMODULE=pyOpenSSL - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -if ! command_exists pip ; then - echo Installing pip - easy_install pip - - if ! command_exists pip ; then - echo "Error while installing pip. Please install pip and run this installation again." - exit 1 - fi -fi -echo Installing ${PYMODULE} -pip install ${PYMODULE} --upgrade \ No newline at end of file diff --git a/asadm-deps/mac/pyasn1/install.sh b/asadm-deps/mac/pyasn1/install.sh deleted file mode 100755 index 56c7dbc7..00000000 --- a/asadm-deps/mac/pyasn1/install.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2013-2017 Aerospike, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ - -PYMODULE=pyasn1 - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -if ! command_exists pip ; then - echo Installing pip - easy_install pip - - if ! command_exists pip ; then - echo "Error while installing pip. Please install pip and run this installation again." - exit 1 - fi -fi -echo Installing ${PYMODULE} -pip install ${PYMODULE} --upgrade \ No newline at end of file diff --git a/asadm-deps/mac/python-pexpect/install.sh b/asadm-deps/mac/python-pexpect/install.sh deleted file mode 100755 index 2948a9b7..00000000 --- a/asadm-deps/mac/python-pexpect/install.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -################################################################################ - -PYMODULE=pexpect - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -python < /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -python < /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -if ! command_exists pip ; then - echo Installing pip - easy_install pip - - if ! command_exists pip ; then - echo "Error while installing pip. Please install pip and run this installation again." - exit 1 - fi -fi -echo Installing ${PYMODULE} -pip install ${PYMODULE} --upgrade diff --git a/asadm-deps/mac/zip/install.sh b/asadm-deps/mac/zip/install.sh deleted file mode 100755 index d85d2ef8..00000000 --- a/asadm-deps/mac/zip/install.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2013-2017 Aerospike, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -if ! command_exists zip ; then - # TODO : add zip installation steps - if ! command_exists zip ; then - echo "Error while installing zip. Please install zip and run this installation again." - exit 1 - fi -fi \ No newline at end of file diff --git a/asadm-deps/rpm/jsonschema/install.sh b/asadm-deps/rpm/jsonschema/install.sh deleted file mode 100755 index f2da6245..00000000 --- a/asadm-deps/rpm/jsonschema/install.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2018-2021 Aerospike, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ - -PYMODULE=jsonschema - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -pip_command="pip" -if ! command_exists ${pip_command} ; then - echo Installing epel-release - yum install epel-release - - echo Installing pip - yum install -y python-pip - - if ! command_exists ${pip_command} ; then - if command_exists pip-python ; then - pip_command="pip-python" - elif command_exists python-pip ; then - pip_command="python-pip" - fi - fi - if ! command_exists ${pip_command} ; then - echo "Error while installing pip. Please install pip and run this installation again." - exit 1 - fi -fi - -echo Installing ${PYMODULE} -${pip_command} install --upgrade ${PYMODULE} diff --git a/asadm-deps/rpm/pyOpenSSL/install.sh b/asadm-deps/rpm/pyOpenSSL/install.sh deleted file mode 100755 index 2f804795..00000000 --- a/asadm-deps/rpm/pyOpenSSL/install.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2013-2017 Aerospike, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ - -PYMODULE=pyOpenSSL - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -pip_command="pip" -if ! command_exists ${pip_command} ; then - echo Installing epel-release - yum install epel-release - - echo Installing pip - yum install -y python-pip - - if ! command_exists ${pip_command} ; then - if command_exists pip-python ; then - pip_command="pip-python" - elif command_exists python-pip ; then - pip_command="python-pip" - fi - fi - if ! command_exists ${pip_command} ; then - echo "Error while installing pip. Please install pip and run this installation again." - exit 1 - fi -fi -echo Installing gcc libffi-devel python-devel openssl-devel -yum install gcc libffi-devel python-devel openssl-devel - -echo Installing ${PYMODULE} -${pip_command} install --upgrade ${PYMODULE} diff --git a/asadm-deps/rpm/pyasn1/install.sh b/asadm-deps/rpm/pyasn1/install.sh deleted file mode 100755 index bcd9aeca..00000000 --- a/asadm-deps/rpm/pyasn1/install.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2013-2017 Aerospike, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ - -PYMODULE=pyasn1 - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -pip_command="pip" -if ! command_exists ${pip_command} ; then - echo Installing epel-release - yum install epel-release - - echo Installing pip - yum install -y python-pip - - if ! command_exists ${pip_command} ; then - if command_exists pip-python ; then - pip_command="pip-python" - elif command_exists python-pip ; then - pip_command="python-pip" - fi - fi - if ! command_exists ${pip_command} ; then - echo "Error while installing pip. Please install pip and run this installation again." - exit 1 - fi -fi - -echo Installing ${PYMODULE} -${pip_command} install --upgrade ${PYMODULE} diff --git a/asadm-deps/rpm/python-pexpect/install.sh b/asadm-deps/rpm/python-pexpect/install.sh deleted file mode 100755 index 8efa84e0..00000000 --- a/asadm-deps/rpm/python-pexpect/install.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash -################################################################################ - -PYMODULE=pexpect - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -python < /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -python < /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -pip_command="pip" -if ! command_exists ${pip_command} ; then - echo Installing epel-release - yum install epel-release - - echo Installing pip - yum install -y python-pip - - if ! command_exists ${pip_command} ; then - if command_exists pip-python ; then - pip_command="pip-python" - elif command_exists python-pip ; then - pip_command="python-pip" - fi - fi - if ! command_exists ${pip_command} ; then - echo "Error while installing pip. Please install pip and run this installation again." - exit 1 - fi -fi - -echo Installing ${PYMODULE} -${pip_command} install --upgrade ${PYMODULE} diff --git a/asadm-deps/rpm/zip/install.sh b/asadm-deps/rpm/zip/install.sh deleted file mode 100755 index 29312686..00000000 --- a/asadm-deps/rpm/zip/install.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2013-2017 Aerospike, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -################################################################################ - -command_exists () { - type "$1" &> /dev/null ; -} - -################################################################################ - -if [ $EUID -ne 0 ]; then - echo "This script requires root or sudo privileges." - exit 1 -fi - -if ! command_exists zip ; then - echo Installing zip - yum install zip - - if ! command_exists zip ; then - echo "Error while installing zip. Please install zip and run this installation again." - exit 1 - fi -fi diff --git a/asadm.spec b/asadm.spec index c698b191..10e2db88 100644 --- a/asadm.spec +++ b/asadm.spec @@ -4,7 +4,7 @@ from PyInstaller.utils.hooks import collect_all datas = [] -binaries = [] +binaries = [('/usr/bin/less','.')] hiddenimports = ['pipes', 'json', 'distro', 'dateutil.parser', 'toml', 'jsonschema', 'fcntl', 'bcrypt', "ply.yacc", "ply.lex", "pexpect.pxssh"] tmp_ret = collect_all('lib') datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2] diff --git a/lib/view/view.py b/lib/view/view.py index 085f4fac..e17f1e91 100644 --- a/lib/view/view.py +++ b/lib/view/view.py @@ -15,6 +15,7 @@ import datetime import locale import logging +from os import path import sys import time from io import StringIO @@ -61,7 +62,13 @@ def print_result(out): if type(out) is not str: out = str(out) if CliView.pager == CliView.LESS: - pipepager(out, cmd="less -RSX") + if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"): + # We are running in a bundled app + less_cmd = path.join(sys._MEIPASS, "less") + " -RSX" # type: ignore MEIPASS is set by pyinstaller. + else: + less_cmd = "less -RSX" + + pipepager(out, less_cmd) elif CliView.pager == CliView.SCROLL: for i in out.split("\n"): print(i) @@ -203,7 +210,7 @@ def info_set(stats, cluster, timestamp="", with_=None, **ignore): node_names = cluster.get_node_names(with_) node_ids = cluster.get_node_ids(with_) title_suffix = CliView._get_timestamp_suffix(timestamp) - title = "Set Information%s" + title_suffix + title = "Set Information%s" % title_suffix sources = dict( node_ids=node_ids, node_names=node_names,