summaryrefslogtreecommitdiff
path: root/lib/extensions/install_custom_palette.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2024-05-22 21:49:35 +0200
committerGitHub <noreply@github.com>2024-05-22 21:49:35 +0200
commit7a19800a6fed788c510156957d5d6c70f34bd222 (patch)
tree918da0319d4a1b053a873e3ff9953aa0be8e6259 /lib/extensions/install_custom_palette.py
parent175709cdcfba4945cb20d21130e04efca54dd7ae (diff)
add links to documention in inx extensions (#2937)
Diffstat (limited to 'lib/extensions/install_custom_palette.py')
-rw-r--r--lib/extensions/install_custom_palette.py6
1 files changed, 5 insertions, 1 deletions
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 "