summaryrefslogtreecommitdiff
path: root/inkstitch.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-07-28 20:40:14 -0400
committerLex Neva <github.com@lexneva.name>2018-07-28 20:40:14 -0400
commit395067f97e641110727c44bb2605050338fe3b98 (patch)
tree6ef5a75721922a4dc25ee1ad7b7a29c6d93613be /inkstitch.py
parentd14880db5820ce2175bda7bbe761c21fd6c454d0 (diff)
support multiword extension names
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