Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wspy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
wspy
Commits
d81c9789
Commit
d81c9789
authored
Aug 22, 2013
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug leading to tuple unpack exception
parent
dbe4eecf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
handshake.py
handshake.py
+9
-4
No files found.
handshake.py
View file @
d81c9789
...
@@ -357,17 +357,22 @@ class ClientHandshake(Handshake):
...
@@ -357,17 +357,22 @@ class ClientHandshake(Handshake):
password
=
password
.
encode
(
'utf-8'
))
password
=
password
.
encode
(
'utf-8'
))
def
split_stripped
(
value
,
delim
=
','
):
def
split_stripped
(
value
,
delim
=
','
,
maxsplits
=-
1
):
return
map
(
str
.
strip
,
str
(
value
).
split
(
delim
))
if
value
else
[]
return
map
(
str
.
strip
,
str
(
value
).
split
(
delim
,
maxsplits
))
if
value
else
[]
def
parse_param_hdr
(
hdr
):
def
parse_param_hdr
(
hdr
):
name
,
paramstr
=
split_stripped
(
hdr
,
';'
)
if
';'
in
hdr
:
name
,
paramstr
=
split_stripped
(
hdr
,
';'
,
1
)
else
:
name
=
hdr
paramstr
=
''
params
=
{}
params
=
{}
for
param
in
split_stripped
(
paramstr
):
for
param
in
split_stripped
(
paramstr
):
if
'='
in
param
:
if
'='
in
param
:
key
,
value
=
split_stripped
(
param
,
'='
)
key
,
value
=
split_stripped
(
param
,
'='
,
1
)
if
value
.
isdigit
():
if
value
.
isdigit
():
value
=
int
(
value
)
value
=
int
(
value
)
...
...
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