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
926e22dc
Commit
926e22dc
authored
May 05, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pep8
parent
a4df5df6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
18 deletions
+3
-18
gevent/_threading.py
gevent/_threading.py
+1
-1
gevent/fileobject.py
gevent/fileobject.py
+0
-3
gevent/hub.py
gevent/hub.py
+1
-0
gevent/subprocess.py
gevent/subprocess.py
+1
-14
No files found.
gevent/_threading.py
View file @
926e22dc
gevent/fileobject.py
View file @
926e22dc
...
...
@@ -33,7 +33,6 @@ else:
from
types
import
UnboundMethodType
class
NA
(
object
):
def
__repr__
(
self
):
...
...
@@ -41,7 +40,6 @@ else:
NA
=
NA
()
class
SocketAdapter
(
object
):
"""Socket-like API on top of a file descriptor.
...
...
@@ -159,7 +157,6 @@ else:
if
SocketAdapter__del__
:
SocketAdapter
.
__del__
=
UnboundMethodType
(
SocketAdapter__del__
,
None
,
SocketAdapter
)
class
FileObjectPosix
(
_fileobject
):
def
__init__
(
self
,
fobj
,
mode
=
'rb'
,
bufsize
=-
1
,
close
=
True
):
...
...
gevent/hub.py
View file @
926e22dc
...
...
@@ -7,6 +7,7 @@ try:
from
gevent._util
import
set_exc_info
except
ImportError
,
ex
:
sys
.
stderr
.
write
(
'Failed to import set_exc_info: %s
\
n
'
%
ex
)
def
set_exc_info
(
*
args
):
pass
...
...
gevent/subprocess.py
View file @
926e22dc
...
...
@@ -204,11 +204,9 @@ class Popen(object):
return
(
None
if
stdout
is
None
else
stdout
.
value
or
''
,
None
if
stderr
is
None
else
stderr
.
value
or
''
)
def
poll
(
self
):
return
self
.
_internal_poll
()
if
mswindows
:
#
# Windows methods
...
...
@@ -269,14 +267,12 @@ class Popen(object):
c2pread
,
c2pwrite
,
errread
,
errwrite
)
def
_make_inheritable
(
self
,
handle
):
"""Return a duplicate of handle, which is inheritable"""
return
_subprocess
.
DuplicateHandle
(
_subprocess
.
GetCurrentProcess
(),
handle
,
_subprocess
.
GetCurrentProcess
(),
0
,
1
,
_subprocess
.
DUPLICATE_SAME_ACCESS
)
def
_find_w9xpopen
(
self
):
"""Find and return absolut path to w9xpopen.exe"""
w9xpopen
=
os
.
path
.
join
(
...
...
@@ -293,7 +289,6 @@ class Popen(object):
"shell or platform."
)
return
w9xpopen
def
_execute_child
(
self
,
args
,
executable
,
preexec_fn
,
close_fds
,
cwd
,
env
,
universal_newlines
,
startupinfo
,
creationflags
,
shell
,
...
...
@@ -318,7 +313,7 @@ class Popen(object):
startupinfo
.
dwFlags
|=
_subprocess
.
STARTF_USESHOWWINDOW
startupinfo
.
wShowWindow
=
_subprocess
.
SW_HIDE
comspec
=
os
.
environ
.
get
(
"COMSPEC"
,
"cmd.exe"
)
args
=
'{} /c "{}"'
.
format
(
comspec
,
args
)
args
=
'{} /c "{}"'
.
format
(
comspec
,
args
)
if
(
_subprocess
.
GetVersion
()
>=
0x80000000
or
os
.
path
.
basename
(
comspec
).
lower
()
==
"command.com"
):
# Win9x, or using command.com on NT. We need to
...
...
@@ -379,7 +374,6 @@ class Popen(object):
self
.
returncode
=
_subprocess
.
GetExitCodeProcess
(
self
.
_handle
)
return
self
.
returncode
def
wait
(
self
):
"""Wait for child process to terminate. Returns returncode
attribute."""
...
...
@@ -455,7 +449,6 @@ class Popen(object):
c2pread
,
c2pwrite
,
errread
,
errwrite
)
def
_set_cloexec_flag
(
self
,
fd
,
cloexec
=
True
):
try
:
cloexec_flag
=
fcntl
.
FD_CLOEXEC
...
...
@@ -468,7 +461,6 @@ class Popen(object):
else
:
fcntl
.
fcntl
(
fd
,
fcntl
.
F_SETFD
,
old
&
~
cloexec_flag
)
def
_close_fds
(
self
,
but
):
if
hasattr
(
os
,
'closerange'
):
os
.
closerange
(
3
,
but
)
...
...
@@ -482,7 +474,6 @@ class Popen(object):
except
:
pass
def
_execute_child
(
self
,
args
,
executable
,
preexec_fn
,
close_fds
,
cwd
,
env
,
universal_newlines
,
startupinfo
,
creationflags
,
shell
,
...
...
@@ -618,7 +609,6 @@ class Popen(object):
os
.
close
(
fd
)
raise
child_exception
def
_handle_exitstatus
(
self
,
sts
):
if
os
.
WIFSIGNALED
(
sts
):
self
.
returncode
=
-
os
.
WTERMSIG
(
sts
)
...
...
@@ -628,14 +618,12 @@ class Popen(object):
# Should never happen
raise
RuntimeError
(
"Unknown child exit status!"
)
def
_internal_poll
(
self
):
"""Check if child process has terminated. Returns returncode
attribute.
"""
return
self
.
returncode
def
wait
(
self
):
"""Wait for child process to terminate. Returns returncode
attribute."""
...
...
@@ -643,7 +631,6 @@ class Popen(object):
self
.
_event
.
wait
()
return
self
.
returncode
def
send_signal
(
self
,
sig
):
"""Send a signal to the process
"""
...
...
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