Closed if1live closed 9 years ago
I think that __import__(...) is duplicated code. I make a function then use it. The role of function is exception handling and importing.
__import__(...)
But, I can't judge which style is more better. Which code do you prefer?
self._import_app_module("{}.admin".format(app))
self._import_app_module("{}.admin", app)
Showing exception manually. Maybe extending this code, we can implement good exception handling.
The current style is good.
More than exception handling I think we need logging support. Currently we do not do any logging, and I think we should log some things, or even set up logging if its not set.
Remove duplicated code
I think that
__import__(...)
is duplicated code. I make a function then use it. The role of function is exception handling and importing.But, I can't judge which style is more better. Which code do you prefer?
self._import_app_module("{}.admin".format(app))
self._import_app_module("{}.admin", app)
Use traceback
Showing exception manually. Maybe extending this code, we can implement good exception handling.