Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sbws
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
juga
sbws
Commits
d563a93f
Commit
d563a93f
authored
6 years ago
by
Matt Traudt
Browse files
Options
Downloads
Patches
Plain Diff
Specify the return value is a string
parent
15a1bb26
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sbws/util/sockio.py
+3
-3
3 additions, 3 deletions
sbws/util/sockio.py
with
3 additions
and
3 deletions
sbws/util/sockio.py
+
3
−
3
View file @
d563a93f
...
...
@@ -18,9 +18,9 @@ def read_line(s, max_len=None, log_fn=print):
:param func log_fn: Function with a signature similar to ``print`` to call
if an error occurs
:raises UnicodeDecodeError: If any byte is not a valid utf8 byte
:returns: Everything read up until a newline and with a maximum
length of
**max_len**. If nothing could be read, returns None. If a
newline is
the first character, returns an empty str
ing
.
:returns: Everything read up until a newline
as a str
and with a maximum
length of
**max_len**. If nothing could be read, returns None. If a
newline is
the first character, returns an empty str.
'''
assert
isinstance
(
s
,
socket
.
socket
)
assert
max_len
is
None
or
(
isinstance
(
max_len
,
int
)
and
max_len
>
0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment