Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cigale
CIGALE
Commits
7ab2afb6
Commit
7ab2afb6
authored
Aug 29, 2015
by
Médéric Boquien
Browse files
We do not prefix modules anymore. Remove now useless code.
parent
6d83c0c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
pcigale/creation_modules/__init__.py
View file @
7ab2afb6
...
...
@@ -150,6 +150,7 @@ class CreationModule(object):
raise
NotImplementedError
()
@
profile
def
get_module
(
name
,
**
kwargs
):
"""Get a SED creation module from its name
...
...
@@ -165,11 +166,9 @@ def get_module(name, **kwargs):
-------
a pcigale.creation_modules.Module instance
"""
# Determine the real module name by removing the dotted prefix.
module_name
=
name
.
split
(
'.'
)[
0
]
try
:
module
=
import_module
(
"."
+
module_
name
,
'pcigale.creation_modules'
)
module
=
import_module
(
"."
+
name
,
'pcigale.creation_modules'
)
return
module
.
Module
(
name
=
name
,
**
kwargs
)
except
ImportError
:
print
(
'Module '
+
module_name
+
' does not exists!'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment