From 2f35a4a192eb6aa3b68b715da6c1ba984084e0e5 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Sun, 25 Jul 2021 07:24:34 +0200 Subject: Fix Style Issues (#1154) Co-authored-by: Lex Neva --- inkstitch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'inkstitch.py') diff --git a/inkstitch.py b/inkstitch.py index 4c9d2789..864c3a98 100644 --- a/inkstitch.py +++ b/inkstitch.py @@ -10,6 +10,12 @@ import traceback from argparse import ArgumentParser from io import StringIO +if getattr(sys, 'frozen', None) is None: + # When running in development mode, we want to use the inkex installed by + # pip install, not the one bundled with Inkscape which is not new enough. + sys.path.remove('/usr/share/inkscape/extensions') + sys.path.append('/usr/share/inkscape/extensions') + from inkex import errormsg from lxml.etree import XMLSyntaxError @@ -27,7 +33,6 @@ formatter = logging.Formatter('%(name)s - %(levelname)s - %(message)s') ch.setFormatter(formatter) logger.addHandler(ch) - parser = ArgumentParser() parser.add_argument("--extension") my_args, remaining_args = parser.parse_known_args() -- cgit v1.2.3