Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Show progress as int #269

Merged
merged 6 commits into from
May 13, 2020
Merged

Show progress as int #269

merged 6 commits into from
May 13, 2020

Conversation

jjnicola
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented May 13, 2020

Codecov Report

Merging #269 into master will increase coverage by 0.05%.
The diff coverage is 69.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #269      +/-   ##
==========================================
+ Coverage   74.51%   74.56%   +0.05%     
==========================================
  Files          21       21              
  Lines        2315     2320       +5     
==========================================
+ Hits         1725     1730       +5     
  Misses        590      590              
Impacted Files Coverage Δ
ospd/ospd.py 76.97% <60.00%> (+0.20%) ⬆️
ospd/scan.py 90.90% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6786774...562300f. Read the comment docs.

ospd/ospd.py Outdated
self,
scan_id: str,
host: str = None,
progress: Union[float, int] = None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should be a float still allowed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comes from the wrapper. It depends on the wrapper implementation. Currently ospd-openvas sends a float value

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we fix that?

ospd/scan.py Outdated
hosts = self.scans_table[scan_id]['target_progress']
if hosts:
for host, progress in hosts.items():
hosts[host] = int(progress)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we ensure that progress is already an int in the scans table?

@jjnicola jjnicola merged commit 4bfffd0 into greenbone:master May 13, 2020
@jjnicola jjnicola deleted the int-progress branch May 13, 2020 13:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants