Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
NTPsec
ntpsec
Compare Revisions
d4b39117c2d454a81bdc1225e5b775228ed0933f...09ffc3463383cc4f54610bad05289ab19b4087e7
Commits (3)
Python3: socket.recv() returns bytes, not a string
· 3aefb058
Matt Selsky
authored
Nov 26, 2016
3aefb058
Python3: Force subprocess.Popen to return strings instead of bytes
· 580de21f
Matt Selsky
authored
Nov 26, 2016
Fixes GitLab issue
#163
580de21f
No more need to cast to str.
· 09ffc346
Matt Selsky
authored
Nov 26, 2016
09ffc346
Hide whitespace changes
Inline
Side-by-side
pylib/packet.py
View file @
09ffc346
...
...
@@ -924,7 +924,7 @@ class ControlSession:
if
self
.
debug
:
warn
(
"At %s, socket read begins
\n
"
%
time
.
asctime
())
rawdata
=
poly
str
(
self
.
sock
.
recv
(
4096
))
rawdata
=
poly
bytes
(
self
.
sock
.
recv
(
4096
))
if
self
.
debug
:
warn
(
"Received %d octets
\n
"
%
len
(
rawdata
))
rpkt
=
ControlPacket
(
self
)
...
...
wafhelpers/configure.py
View file @
09ffc346
...
...
@@ -126,9 +126,9 @@ def cmd_configure(ctx, config):
if
exists
(
".git"
)
and
ctx
.
find_program
(
"git"
,
var
=
"BIN_GIT"
,
mandatory
=
False
):
ctx
.
start_msg
(
"DEVEL: Getting revision"
)
cmd
=
[
"git"
,
"log"
,
"-1"
,
"--format=%H"
]
p
=
subprocess
.
Popen
(
cmd
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
env
=
Non
e
)
p
=
subprocess
.
Popen
(
cmd
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
universal_newlines
=
Tru
e
)
ctx
.
env
.
NTPSEC_REVISION
,
stderr
=
p
.
communicate
()
ctx
.
env
.
NTPSEC_REVISION
=
str
(
ctx
.
env
.
NTPSEC_REVISION
)
.
replace
(
"
\n
"
,
""
)
ctx
.
env
.
NTPSEC_REVISION
=
ctx
.
env
.
NTPSEC_REVISION
.
replace
(
"
\n
"
,
""
)
ctx
.
end_msg
(
ctx
.
env
.
NTPSEC_REVISION
)
ctx
.
start_msg
(
"Building version"
)
...
...