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

Refactor misc #111

Merged
merged 14 commits into from
Jun 24, 2019
Merged

Refactor misc #111

merged 14 commits into from
Jun 24, 2019

Conversation

bjoernricks
Copy link
Contributor

No description provided.

@bjoernricks bjoernricks requested review from jjnicola and a team June 21, 2019 12:17
@codecov
Copy link

codecov bot commented Jun 21, 2019

Codecov Report

Merging #111 into master will increase coverage by 1.47%.
The diff coverage is 65.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #111      +/-   ##
==========================================
+ Coverage   68.48%   69.96%   +1.47%     
==========================================
  Files           8       10       +2     
  Lines        1631     1588      -43     
==========================================
- Hits         1117     1111       -6     
+ Misses        514      477      -37
Impacted Files Coverage Δ
ospd/main.py 0% <0%> (ø)
ospd/ospd.py 66.14% <100%> (-0.01%) ⬇️
ospd/network.py 71.91% <71.91%> (ø)
ospd/misc.py 81.18% <75%> (+10.5%) ⬆️
ospd/parser.py 77.5% <77.5%> (ø)

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 516ce71...f6c0982. Read the comment docs.

Move network related function from misc to new network module.
Our own versions aren't needed anymore because they have been added for
windows support. The python socket library has windows support since
python 3.4

See https://docs.python.org/3.5/library/socket.html#socket.inet_pton
and https://docs.python.org/3.5/library/socket.html#socket.inet_ntop
Start to use typings for functions in network module. This will help to
gather expected behavior and to implement tests.
Move the cli parser related functions from misc into a new parser
module.
Move main and print_version functions from misc module into a new main
module. Rewrite print_version to support file output.
Include the wrapper name into the logging output. This will allow to
remove the wrapper_logging code.
All modules should use an independent logger now.
jjnicola
jjnicola previously approved these changes Jun 21, 2019
@jjnicola jjnicola dismissed their stale review June 21, 2019 14:41

Change requested.

SysLogHandler and WatchedFiledHandler need to be imported from
logging.handlers module.
@bjoernricks bjoernricks merged commit b39bacb into greenbone:master Jun 24, 2019
@bjoernricks bjoernricks deleted the refactor-misc branch June 24, 2019 07:29
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.

2 participants