Added a missing docstring

This commit is contained in:
Armin Ronacher 2014-04-28 13:54:13 +02:00
parent 984142072b
commit ff034e42cf

View file

@ -53,6 +53,9 @@ def find_best_app(module):
def prepare_exec_for_file(filename): def prepare_exec_for_file(filename):
"""Given a filename this will try to calculate the python path, add it
to the search path and return the actual module name that is expected.
"""
module = [] module = []
# Chop off file extensions or package markers # Chop off file extensions or package markers
@ -187,8 +190,7 @@ class FlaskClickGroup(click.Group):
def __init__(self, help=None): def __init__(self, help=None):
def set_app_id(ctx, value): def set_app_id(ctx, value):
if value is not None: if value is not None:
if os.path.isfile(value) or os.sep in value or \ if os.path.isfile(value):
os.altsep is not None and os.altsep in value:
value = prepare_exec_for_file(value) value = prepare_exec_for_file(value)
ctx.obj.app_import_path = value ctx.obj.app_import_path = value
def set_debug(ctx, value): def set_debug(ctx, value):