Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
a1d7e48a
Commit
a1d7e48a
authored
Jun 23, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove print statements, simplify expression.
parent
f318b6d2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
4 deletions
+1
-4
gevent/_socket3.py
gevent/_socket3.py
+1
-1
greentest/test__socket.py
greentest/test__socket.py
+0
-3
No files found.
gevent/_socket3.py
View file @
a1d7e48a
...
...
@@ -65,7 +65,7 @@ class socket(object):
# Only defined under Linux
@
property
def
type
(
self
):
return
_socket
.
socket
.
type
.
__get__
(
self
.
_sock
)
&
~
_socket
.
SOCK_NONBLOCK
return
self
.
_sock
.
type
&
~
_socket
.
SOCK_NONBLOCK
def
__enter__
(
self
):
return
self
...
...
greentest/test__socket.py
View file @
a1d7e48a
...
...
@@ -187,15 +187,12 @@ class TestTCP(greentest.TestCase):
def
test_attributes
(
self
):
s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_DGRAM
,
0
)
print
(
"Socket type"
,
s
.
type
)
self
.
assertEqual
(
socket
.
AF_INET
,
s
.
type
)
self
.
assertEqual
(
socket
.
SOCK_DGRAM
,
s
.
family
)
self
.
assertEqual
(
0
,
s
.
proto
)
if
hasattr
(
socket
,
'SOCK_NONBLOCK'
):
print
(
"Has non-block"
)
s
.
settimeout
(
1
)
print
(
"Socket type with timeout"
,
s
.
type
)
self
.
assertEqual
(
socket
.
AF_INET
,
s
.
type
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment