summaryrefslogtreecommitdiff
path: root/lib/extensions/select_elements.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extensions/select_elements.py')
-rw-r--r--lib/extensions/select_elements.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/extensions/select_elements.py b/lib/extensions/select_elements.py
index 896e04b0..55aae46c 100644
--- a/lib/extensions/select_elements.py
+++ b/lib/extensions/select_elements.py
@@ -7,9 +7,10 @@ import os
import subprocess
import sys
-from inkex import Boolean
+from inkex import Boolean, errormsg
from ..elements import Clone, FillStitch, Polyline, SatinColumn, Stroke
+from ..i18n import _
from ..utils import get_bundled_dir
from .base import InkstitchExtension
@@ -67,17 +68,16 @@ class SelectElements(InkstitchExtension):
# we are running a local install
py_path = sys.executable
- # For some reason we cannot use the subprocess method wait() to finish the process properly
- # and we'll get a warning. It will break functionality of the selection.
- # There is most possibly a better way than to just ignore the warning?!?
- with open(os.devnull, 'w') as null:
- sys.stderr = null
- sys.stdout = null
-
# custom python path
if self.options.python_path:
py_path = self.options.python_path
+ if not os.path.isfile(py_path):
+ errormsg(_("Could not detect python path. "
+ "Please insert python path manually as described in the help tab "
+ "of the select elements dialog."))
+ sys.exit(0)
+
return py_path, file_path
def _get_id_list(self):