2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-11 16:24:41 +00:00

Fix detection of missing sync source

Rather than just assume we want a directory when glob
finds no matches, just take the empty result.
This commit is contained in:
Jarrod Johnson 2021-08-02 11:33:08 -04:00
parent 2219297afc
commit b604ec4773

View File

@ -100,10 +100,7 @@ def stage_ent(currmap, ent, targdir):
allfents = ent.split()
for tmpent in allfents:
fents = glob.glob(tmpent)
if fents:
everyfent.extend(fents)
else:
everyfent.extend(os.path.dirname(tmpent))
everyfent.extend(fents)
if not everyfent:
raise Exception('No matching files for "{}"'.format(ent))
if dst is None: # this is to indicate source and destination as one