From 7a19800a6fed788c510156957d5d6c70f34bd222 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Wed, 22 May 2024 21:49:35 +0200 Subject: add links to documention in inx extensions (#2937) --- lib/extensions/install_custom_palette.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/extensions/install_custom_palette.py') diff --git a/lib/extensions/install_custom_palette.py b/lib/extensions/install_custom_palette.py index da546cad..1636d1fd 100644 --- a/lib/extensions/install_custom_palette.py +++ b/lib/extensions/install_custom_palette.py @@ -16,6 +16,7 @@ from .base import InkstitchExtension class InstallCustomPalette(InkstitchExtension): def __init__(self, *args, **kwargs): InkstitchExtension.__init__(self, *args, **kwargs) + self.arg_parser.add_argument("--notebook") self.arg_parser.add_argument("-f", "--filepath", type=str, default="", dest="filepath") def effect(self): @@ -35,7 +36,10 @@ class InstallCustomPalette(InkstitchExtension): if not os.path.isdir(palette_path): inkex.errormsg(_("Ink/Stitch cannot find your palette folder automatically. Please install your palette manually.")) dest = os.path.join(palette_path, palette_name) - shutil.copyfile(gpl, dest) + try: + shutil.copyfile(gpl, dest) + except shutil.SameFileError: + pass if not os.path.isfile(dest): inkex.errormsg("Something wwent wrong. Ink/Stitch wasn't able to copy your palette " -- cgit v1.2.3