8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fe70a6 commit 6646b2dCopy full SHA for 6646b2d
common/tools.py
@@ -449,11 +449,14 @@ def checkXServer():
449
Returns:
450
bool: ``True`` if X11 server is running
451
"""
452
- proc = subprocess.Popen(['xdpyinfo'],
453
- stdout = subprocess.DEVNULL,
454
- stderr = subprocess.DEVNULL)
455
- proc.communicate()
456
- return proc.returncode == 0
+ if which('xdpyinfo') is not None:
+ proc = subprocess.Popen(['xdpyinfo'],
+ stdout = subprocess.DEVNULL,
+ stderr = subprocess.DEVNULL)
+ proc.communicate()
457
+ return proc.returncode == 0
458
+ else:
459
+ return False
460
461
def preparePath(path):
462
0 commit comments