Skip to content

Commit 4068d83

Browse files
diningPhilosopher64prabhakk-mw
authored andcommitted
bugfix: Check if connected to tty before using system commands
fixes #1
1 parent 58d1910 commit 4068d83

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ The MATLAB Proxy is under active development. For support or to report issues, s
2525
Install it on your linux machine using:
2626
```bash
2727
# On a Debian/Ubuntu based system:
28-
sudo apt install Xvfb
28+
$ sudo apt install xvfb
2929
```
3030
```bash
3131
# On a RHEL based system:
32-
sudo yum install Xvfb
32+
$ yum search Xvfb
33+
xorg-x11-server-Xvfb.x86_64 : A X Windows System virtual framebuffer X server.
34+
35+
$ sudo yum install xorg-x11-server-Xvfb
3336
```
3437
* Python versions: **3.6** | **3.7** | **3.8** | **3.9**
3538
* [Browser Requirements](https://www.mathworks.com/support/requirements/browser-requirements.html)

matlab_proxy/util/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,15 @@ def prettify(boundary_filler=" ", text_arr=[]):
124124
[str]: Prettified String
125125
"""
126126

127+
import sys
128+
129+
if not sys.stdout.isatty():
130+
return (
131+
"\n============================\n"
132+
+ "\n".join(text_arr)
133+
+ "\n============================\n"
134+
)
135+
127136
size = os.get_terminal_size()
128137
cols, _ = size.columns, size.lines
129138

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def run(self):
5151

5252
setuptools.setup(
5353
name="matlab-proxy",
54-
version="0.2.3",
54+
version="0.2.4",
5555
url=config["doc_url"],
5656
author="The MathWorks, Inc.",
5757
author_email="cloud@mathworks.com",

0 commit comments

Comments
 (0)