Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

Commit d204ac0

Browse files
committed
Check for Windows when adding StartupInfo
1 parent 8e706fd commit d204ac0

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

searchengines/base.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ def run(self, query, folders):
4141
print("Running: %s" % " ".join(arguments))
4242

4343
try:
44-
startupinfo = subprocess.STARTUPINFO()
45-
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
44+
startupinfo = None
45+
if os.name == 'nt':
46+
startupinfo = subprocess.STARTUPINFO()
47+
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
48+
4649
pipe = subprocess.Popen(arguments,
4750
stdout=subprocess.PIPE,
4851
stderr=subprocess.PIPE,

0 commit comments

Comments
 (0)