summarylogtreecommitdiffstats
path: root/otrverwaltung3p_actions_cutvirtualdub.diff
blob: 951e2b4b7355b5940cabbb9780deca576e04cdbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- otr-verwaltung3p-1.0.0b8.post1/otrverwaltung3p/actions/cutvirtualdub.py	2020-07-23 08:03:38.000000000 +0200
+++ otr-verwaltung3p-1.0.0b8.post1/otrverwaltung3p/actions/cutvirtualdub_b.py	2020-07-23 11:03:57.181021042 +0200
@@ -16,6 +16,7 @@
 # END LICENSE
 
 import os
+import shutil
 import subprocess
 import time
 
@@ -64,13 +65,10 @@
             return None, error
 
         # find wine
-        def cmd_exists(x):
-            any(os.access(os.path.join(pathx, x), os.X_OK) for pathx in os.environ["PATH"].split(os.pathsep))
-
-        if cmd_exists("wineconsole"):
-            winecommand = "wineconsole"
-        elif cmd_exists("wine"):
-            winecommand = "wine"
+        if shutil.which("wineconsole"):
+            winecommand = shutil.which("wineconsole")
+        elif shutil.which("wine"):
+            winecommand = shutil.which("wine")
         else:
             return None, "Wine konnte nicht aufgerufen werden."