Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
git-repo
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux-tools
git-repo
Commits
c710fe05
Commit
c710fe05
authored
Jan 13, 2016
by
Matthias Putz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Portable: fixed -p option for forall
parent
a4168527
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
portable.py
portable.py
+14
-0
forall.py
subcmds/forall.py
+4
-2
No files found.
portable.py
View file @
c710fe05
...
...
@@ -64,6 +64,12 @@ class file_reader(object):
def
read
(
self
,
bufsize
):
return
self
.
fd
.
read
(
bufsize
)
def
close
(
self
):
return
self
.
fd
.
close
()
def
src
(
self
):
return
self
.
fd
class
socket_reader
():
"""select socket with file descriptor class"""
def
__init__
(
self
,
src
,
dest
,
std_name
=
''
):
...
...
@@ -98,12 +104,20 @@ class socket_reader():
return
self
.
server_socket
.
recv
(
bufsize
)
except
Exception
as
e
:
Trace
(
"failed to read from server socket: "
+
e
.
strerror
)
self
.
close
()
def
close
(
self
):
if
self
.
client_socket
:
self
.
client_socket
.
close
()
if
self
.
server_socket
:
self
.
server_socket
.
close
()
def
fileno
(
self
):
return
self
.
server_socket
.
fileno
()
def
src
(
self
):
return
self
.
src
def
os_symlink
(
src
,
dst
):
if
isUnix
():
...
...
subcmds/forall.py
View file @
c710fe05
...
...
@@ -364,12 +364,14 @@ def DoWork(project, mirror, opt, cmd, shell, cnt, config):
# buf = s.fd.read(4096)
buf
=
s
.
read
(
4096
)
if
not
buf
:
s
.
fd
.
close
()
# s.fd.close()
s
.
close
()
s_in
.
remove
(
s
)
continue
if
not
opt
.
verbose
:
if
s
.
fd
!=
p
.
stdout
:
# if s.fd != p.stdout:
if
s
.
src
!=
p
.
stdout
:
errbuf
+=
buf
continue
...
...
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