def get_valid_filename(s):
    """
    like the regular get_valid_filename, but also slugifies away
    umlauts and stuff.
    """
    s = get_valid_filename_django(s)
    filename, ext = os.path.splitext(s)
    filename = slugify(filename)
    ext = slugify(ext)
    if ext:
        return (filename, ext) % "%s.%s"
    else:
        return "%s" % (filename,)
dataset/ETHPy150Open divio/django-filer/filer/utils/files.py/get_valid_filename/swapped operands of `%`