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

Missing attribute: errno #2378

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Missing attribute: errno #2378

wants to merge 1 commit into from

Conversation

b0urb0n
Copy link

@b0urb0n b0urb0n commented Jul 17, 2018

Thanks for contributing! But first: did you read our community guidelines?
https://cuckoo.sh/docs/introduction/community.html

What I have added/changed is:

cuckoo.core.resultserver handled vanilla Exceptions which are not guaranteed to have the errno attribute. EnvironmentError exceptions will have the errno attribute. The only exception that SocketServer should throw is a socket.error which is a subclass of IOError which is a subclass of EnvironmentError. So, changing the exception type of this try/except block is sufficient to solve this problem.

The goal of my change is:

Fix for #2270

What I have tested about my change is:

Starting the resultserver with bogus parameters to force the exception.

I'd like input on:

Non-EnvironmentError exceptions currently are unhandled as they should not be generated by normal operation of SocketServer.ThreadingTCPServer.__init__. We may want to consider adding a generic except Exception as e branch that raises a CuckooCriticalError in case the raised exception is not a subclass of EnvironmentError.

@coveralls
Copy link

coveralls commented Jul 17, 2018

Coverage Status

Coverage remained the same at 61.949% when pulling 9dc8453 on b0urb0n:master into c41c7c5 on cuckoosandbox:master.

@codecov-io
Copy link

codecov-io commented Jul 17, 2018

Codecov Report

Merging #2378 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #2378   +/-   ##
======================================
  Coverage      62%     62%           
======================================
  Files         152     152           
  Lines       15177   15177           
======================================
  Hits         9410    9410           
  Misses       5767    5767
Impacted Files Coverage Δ
cuckoo/core/resultserver.py 45.03% <0%> (ø) ⬆️

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 c41c7c5...9dc8453. Read the comment docs.

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

3 participants