Skip to content

Commit

Permalink
remove string useage
Browse files Browse the repository at this point in the history
  • Loading branch information
wdpypere committed Mar 28, 2024
1 parent 57e1563 commit 5acf86e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/vsc/utils/netcat.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,10 @@ def connect_and_send(host, port, data, timeout=10):
data can be:
- bytes
- string
- list of strings
timeout value is counted for the entire connection so includes
sending of data.
"""
# convert list to string if needed
if isinstance(data, list):
data = "\n".join(data)

# make sure data is bytes
if isinstance(data, str):
data = data.encode('utf-8')
Expand Down

0 comments on commit 5acf86e

Please sign in to comment.