Content-Length: 299493 | pFad | https://github.com/RustPython/RustPython/pull/632

7E Socket OSError by palaviv · Pull Request #632 · RustPython/RustPython · GitHub
Skip to content

Socket OSError #632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 9, 2019
Merged

Socket OSError #632

merged 5 commits into from
Mar 9, 2019

Conversation

palaviv
Copy link
Contributor

@palaviv palaviv commented Mar 8, 2019

Change many socket errors to OSError with indicative error message. For example:

>>>>> import socket
>>>>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>>>> s.connect(("127.0.0.1", 1))
Traceback (most recent call last):
  File <stdin>, line 0, in <module>
OSError: Connection refused (os error 111)

@codecov-io
Copy link

codecov-io commented Mar 8, 2019

Codecov Report

Merging #632 into master will increase coverage by 0.1%.
The diff coverage is 36.73%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #632     +/-   ##
=========================================
+ Coverage   40.92%   41.02%   +0.1%     
=========================================
  Files          76       76             
  Lines       17332    17430     +98     
  Branches     4529     4540     +11     
=========================================
+ Hits         7093     7151     +58     
- Misses       8281     8308     +27     
- Partials     1958     1971     +13
Impacted Files Coverage Δ
vm/src/builtins.rs 35.92% <100%> (+0.03%) ⬆️
vm/src/stdlib/socket.rs 58.62% <35.41%> (-0.57%) ⬇️
vm/src/obj/objzip.rs 37.2% <0%> (-7.53%) ⬇️
vm/src/obj/objenumerate.rs 48.27% <0%> (-2.75%) ⬇️
vm/src/bytecode.rs 45% <0%> (-1.64%) ⬇️
vm/src/obj/objmodule.rs 81.25% <0%> (-1.11%) ⬇️
wasm/lib/src/vm_class.rs 0% <0%> (ø) ⬆️
wasm/lib/src/convert.rs 0% <0%> (ø) ⬆️
vm/src/pyobject.rs 61.03% <0%> (+0.2%) ⬆️
... and 6 more

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 0febcb9...8df0e46. Read the comment docs.

@@ -24,12 +24,12 @@ enum AddressFamily {
}

impl AddressFamily {
fn from_i32(value: i32) -> AddressFamily {
fn from_i32(vm: &mut VirtualMachine, value: i32) -> Result<AddressFamily, PyObjectRef> {
Copy link
Contributor

Choose a reason for hiding this comment

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

You could use a templated PyResult --> PyResult<AddressFamily>

@windelbouwman windelbouwman merged commit c1ddcbb into RustPython:master Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/RustPython/RustPython/pull/632

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy