Commit dcfb24be authored by Cresson Remi's avatar Cresson Remi
Browse files

FIX: remove pathify()

1 merge request!6Checkpoints callbacks fixes
Showing with 1 addition and 10 deletions
+1 -10
...@@ -84,16 +84,7 @@ def get_files(directory, ext=None): ...@@ -84,16 +84,7 @@ def get_files(directory, ext=None):
def new_bname(filename, suffix): def new_bname(filename, suffix):
""" return a new basename (without path, without extension, + suffix) """ """ return a new basename (without path, without extension, + suffix) """
filename = filename[filename.rfind("/"):] return pathlib.Path(filename).stem + "_" + suffix
filename = filename[:filename.rfind(".")]
return filename + "_" + suffix
def pathify(pth):
""" Adds posix separator if needed """
if not pth.endswith("/"):
pth += "/"
return pth
def mkdir(pth): def mkdir(pth):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment