mirror of
https://github.com/curl/curl.git
synced 2026-06-21 04:25:38 +03:00
smbserver: update internal id generation for Python 3
Also: - make next id based on highest in list + 1. (was: last id in list + 1) - unfold a line. Spotted by GitHub Code Quality Ref: https://portingguide.readthedocs.io/en/latest/dicts.html?highlight=keys Closes #21937
This commit is contained in:
parent
ce53f90f20
commit
2864e99543
1 changed files with 2 additions and 3 deletions
|
|
@ -212,8 +212,7 @@ class TestSmbServer(imp_smbserver.SMBSERVER):
|
|||
|
||||
flags2 = recv_packet["Flags2"]
|
||||
ncax_data = imp_smb.SMBNtCreateAndX_Data(flags=flags2,
|
||||
data=smb_command[
|
||||
"Data"])
|
||||
data=smb_command["Data"])
|
||||
requested_file = imp_smbserver.decodeSMBString(
|
||||
flags2,
|
||||
ncax_data["FileName"])
|
||||
|
|
@ -234,7 +233,7 @@ class TestSmbServer(imp_smbserver.SMBSERVER):
|
|||
if len(conn_data["OpenedFiles"]) == 0:
|
||||
fakefid = 1
|
||||
else:
|
||||
fakefid = conn_data["OpenedFiles"].keys()[-1] + 1
|
||||
fakefid = max(conn_data["OpenedFiles"].keys()) + 1
|
||||
resp_params["Fid"] = fakefid
|
||||
resp_params["CreateAction"] = disposition
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue