Comment 1 for bug 716309

Revision history for this message
André Ventura (afv) wrote :

Not only when there is no metadata but also when the file name pattern does not match.

Solution:

Edit the pyrenamer_filefuncs.py (at /usr/lib/python2.7/site-packages/pyrenamer/), adding this two lines to the "def replace_images(name, path, newname, newpath):" function:

----------
    if cameramodel != None: newname = newname.replace('{cameramodel}', cameramodel)
    else: newname = newname.replace('{cameramodel}', '')

+ if newname == "None":
+ return None, None

    # Returns new name and path
    newpath = get_new_path(newname, path)
    return unicode(newname), unicode(newpath)
----------

Recompile it:
python2 -O pyrenamer_filefuncs.py