Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nemu3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
nemu3
Commits
3103ec9f
Commit
3103ec9f
authored
Aug 31, 2010
by
Martín Ferrari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_get_file(): be consistent regarding dup()
parent
01b281fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
src/netns/protocol.py
src/netns/protocol.py
+1
-4
No files found.
src/netns/protocol.py
View file @
3103ec9f
...
...
@@ -637,10 +637,7 @@ def _db64(text):
return
base64
.
b64decode
(
text
[
1
:])
def
_get_file
(
fd
,
mode
):
# XXX: In some cases we do not call dup(); maybe this should be consistent?
if
hasattr
(
fd
,
"readline"
):
return
fd
# Since openfd insists on closing the fd on destruction, I need to dup()
# Since fdopen insists on closing the fd on destruction, I need to dup()
if
hasattr
(
fd
,
"fileno"
):
nfd
=
os
.
dup
(
fd
.
fileno
())
else
:
...
...
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