[minor] [fix] get_file_versions
This commit is contained in:
parent
03ccfcbfcf
commit
abb93ad8a2
1 changed files with 6 additions and 1 deletions
|
|
@ -113,7 +113,12 @@ def save_file(fname, content, dt, dn):
|
|||
return f.doc
|
||||
|
||||
def get_file_versions(files_path, main, extn):
|
||||
return filter(lambda f: f.startswith(main) and f.endswith(extn), os.listdir(files_path))
|
||||
out = []
|
||||
for f in os.listdir(files_path):
|
||||
f = cstr(f)
|
||||
if f.startswith(main) and f.endswith(extn):
|
||||
out.append(f)
|
||||
return out
|
||||
|
||||
def get_new_fname_based_on_version(files_path, main, extn, versions):
|
||||
versions.sort()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue