summaryrefslogtreecommitdiff
path: root/inkstitch.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-08-16 16:36:39 -0400
committerLex Neva <github.com@lexneva.name>2018-08-16 16:36:39 -0400
commit284748a682d4aa95c91cc215d5945181c833de15 (patch)
tree6334f284489243be5634fc811401de10631a87dd /inkstitch.py
parent64062f7cd7eee9ed5701209618b0564a211c494b (diff)
parent0f882f07eb0fc263fcb8e05c1a212199902863da (diff)
Merge branch 'master' into lexelby-no-embroider-command
Diffstat (limited to 'inkstitch.py')
-rw-r--r--inkstitch.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/inkstitch.py b/inkstitch.py
index a9ce829e..2e21d964 100644
--- a/inkstitch.py
+++ b/inkstitch.py
@@ -10,7 +10,11 @@ parser.add_argument("--extension")
my_args, remaining_args = parser.parse_known_args()
extension_name = my_args.extension
-extension_class = getattr(extensions, extension_name.capitalize())
+
+# example: foo_bar_baz -> FooBarBaz
+extension_class_name = extension_name.title().replace("_", "")
+
+extension_class = getattr(extensions, extension_class_name)
extension = extension_class()
exception = None