in import_mapping() do not fail on None

This commit is contained in:
Benjamin Dauvergne 2011-10-13 15:43:41 +02:00
parent 4ca053c3ce
commit 227c0de8c5
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ from mandaye.exceptions import ImproperlyConfigured
# TODO: add an external url mapping
def import_mapping(path):
if not '.' in path:
if not path or not '.' in path:
return path
i = path.rfind('.')
module, attr = path[:i], path[i+1:]