summaryrefslogtreecommitdiff
path: root/inkstitch.py
diff options
context:
space:
mode:
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