mirror of
https://abf.rosa.ru/djam/abf-console-client-src.git
synced 2025-02-23 18:02:50 +00:00
Just ignore empty files; otherwise this can break .abf.yml
This commit is contained in:
parent
d3744255dc
commit
92d68b9b6a
1 changed files with 5 additions and 7 deletions
|
@ -538,20 +538,18 @@ def upload_files(models, min_size, path=None, remove_files=True, upload_all=Fals
|
|||
if not os.path.exists(source) and os.path.exists(os.path.join(rpm_src_dir, src)):
|
||||
source = os.path.join(rpm_src_dir, src)
|
||||
|
||||
if not os.path.exists(source):
|
||||
filesize = os.stat(source).st_size
|
||||
if not os.path.exists(source) or filesize == 0:
|
||||
if is_url:
|
||||
log.info(_('File %s not found, URL will be used instead. Skipping.') % src)
|
||||
log.info(_('File %s not found or empty, URL will be used instead. Skipping.') % src)
|
||||
continue
|
||||
if src not in yaml_files:
|
||||
log.error(_("error: Source%(num)d file %(source)s does not exist, skipping!") % {'num': num, 'source': source})
|
||||
errors_count += 1;
|
||||
else:
|
||||
log.info(_('File %s not found, but it\'s listed in .abf.yml. Skipping.') % src)
|
||||
log.info(_('File %s not found or empty, but it\'s listed in .abf.yml. Skipping.') % src)
|
||||
continue
|
||||
filesize = os.stat(source).st_size
|
||||
if filesize == 0:
|
||||
log.debug(_('Size of %s is 0, skipping') % src)
|
||||
do_not_upload = True
|
||||
|
||||
if filesize < min_size:
|
||||
log.debug(_('Size of %s less then minimal, skipping') % src)
|
||||
do_not_upload = True
|
||||
|
|
Loading…
Add table
Reference in a new issue