Skip to content

Commit

Permalink
Fix runCommand on non-Windows platform
Browse files Browse the repository at this point in the history
Signed-off-by: Loren Eteval <[email protected]>
  • Loading branch information
LorenEteval committed Sep 6, 2023
1 parent 8c26813 commit 5d54bca
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Furious/Utility/Utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
ROOT_DIR,
DEFAULT_TOR_SOCKS_PORT,
DEFAULT_TOR_HTTPS_PORT,
DEFAULT_TOR_RELAY_ESTABLISH_TIMEOUT,
)

from PySide6 import QtCore
Expand Down Expand Up @@ -152,7 +153,7 @@ class TorRelaySettingsStorage:
'httpsTunnelPort': DEFAULT_TOR_HTTPS_PORT,
'useProxy': True,
'logLevel': 'notice',
'relayEstablishTimeout': 15,
'relayEstablishTimeout': DEFAULT_TOR_RELAY_ESTABLISH_TIMEOUT,
}

@staticmethod
Expand Down Expand Up @@ -341,7 +342,12 @@ def isValidIPAddress(address):


def runCommand(*args, **kwargs):
return subprocess.run(*args, creationflags=subprocess.CREATE_NO_WINDOW, **kwargs)
if PLATFORM == 'Windows':
return subprocess.run(
*args, creationflags=subprocess.CREATE_NO_WINDOW, **kwargs
)
else:
return subprocess.run(*args, **kwargs)


def getAbsolutePath(path):
Expand Down

0 comments on commit 5d54bca

Please sign in to comment.