-
Notifications
You must be signed in to change notification settings - Fork 678
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#46 - fix run() on Windows environment
The run() function does not work correctly on Windows. The root cause is semi-colon is not approrpriate as delimiter to combine with exit 0 command (for retrieving error output without triggering exception). This fix uses ; for Linux and macOS and & as the delimiter in Windows environment. More details in #46.
- Loading branch information
Showing
3 changed files
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
setup( | ||
name='tagui', | ||
version='1.9.1', | ||
version='1.10.0', | ||
py_modules=['tagui'], | ||
author='Ken Soh', | ||
author_email='[email protected]', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
"""INTEGRATION ENGINE FOR TAGUI PYTHON PACKAGE ~ TEBEL.ORG""" | ||
__author__ = 'Ken Soh <[email protected]>' | ||
__version__ = '1.9.1' | ||
__version__ = '1.10.0' | ||
|
||
import subprocess | ||
import os | ||
|
@@ -1167,8 +1167,12 @@ def run(command_to_run = None): | |
return '' | ||
|
||
else: | ||
if platform.system() == 'Windows': | ||
command_delimiter = ' & ' | ||
else: | ||
command_delimiter = '; ' | ||
return _py23_decode(subprocess.check_output( | ||
command_to_run + '; exit 0', | ||
command_to_run + command_delimiter + 'exit 0', | ||
stderr=subprocess.STDOUT, | ||
shell=True)) | ||
|
||
|