Skip to content

Commit

Permalink
Merge pull request #353 from rfbgo/allow_empty_upload
Browse files Browse the repository at this point in the history
Detect when 0 rows of data would be uploaded
  • Loading branch information
douglasjacobsen authored Dec 14, 2023
2 parents f3b0bfe + 1c6d559 commit 1457228
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/ramble/ramble/experimental/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ def upload_results(results):
logger.die('No upload URI (config:upload:uri) in config.')

logger.msg(f'Uploading Results to {uri}')
uploader.perform_upload(uri, formatted_data)

if len(formatted_data) == 0:
logger.warn('No data to upload')
else:
uploader.perform_upload(uri, formatted_data)
else:
raise ConfigError("Unknown config:upload:type value")

Expand Down

0 comments on commit 1457228

Please sign in to comment.