Require that dist files have a supported extension.
This commit is contained in:
parent
2ddc2804a0
commit
3a84dfcdfc
1 changed files with 9 additions and 4 deletions
|
@ -111,12 +111,17 @@ class DistCatcher(object):
|
||||||
logging.info("No tarballs found in dist directory.")
|
logging.info("No tarballs found in dist directory.")
|
||||||
|
|
||||||
parent_directory = os.path.dirname(self.export_directory)
|
parent_directory = os.path.dirname(self.export_directory)
|
||||||
diff = set(os.listdir(parent_directory)) - set([self.export_directory])
|
diff = (set(os.listdir(parent_directory)) -
|
||||||
|
set([os.path.basename(self.export_directory)]))
|
||||||
if len(diff) == 1:
|
if len(diff) == 1:
|
||||||
fn = diff.pop()
|
fn = diff.pop()
|
||||||
logging.info("Found tarball %s in parent directory.", fn)
|
if is_dist_file(fn):
|
||||||
self.files.append(os.path.join(parent_directory, fn))
|
logging.info("Found tarball %s in parent directory.", fn)
|
||||||
return fn
|
self.files.append(os.path.join(parent_directory, fn))
|
||||||
|
return fn
|
||||||
|
logging.warning(
|
||||||
|
"Found file %s in parent directory, "
|
||||||
|
"but not in supported dist format", fn)
|
||||||
|
|
||||||
if "dist" in new_files:
|
if "dist" in new_files:
|
||||||
for entry in os.scandir(os.path.join(self.export_directory, "dist")):
|
for entry in os.scandir(os.path.join(self.export_directory, "dist")):
|
||||||
|
|
Loading…
Add table
Reference in a new issue