Skip to content

Commit

Permalink
Merge pull request #570 from HongGeonUi/enhancement/f-string/HongGeonUi3
Browse files Browse the repository at this point in the history
Fix: Apply f-string binlogstream.py L135:L141
  • Loading branch information
dongwook-chan authored Oct 21, 2023
2 parents b72d476 + 8f5ac8a commit fbeaead
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pymysqlreplication/binlogstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ def encoded(self, server_id, master_id=0):
+ bytes(bytearray([COM_REGISTER_SLAVE]))
+ struct.pack("<L", server_id)
+ struct.pack(
"<%dp" % min(MAX_STRING_LEN, lhostname + 1), self.hostname.encode()
f"<{min(MAX_STRING_LEN, lhostname + 1)}p", self.hostname.encode()
)
+ struct.pack(
"<%dp" % min(MAX_STRING_LEN, lusername + 1), self.username.encode()
f"<{min(MAX_STRING_LEN, lusername + 1)}p", self.username.encode()
)
+ struct.pack(
"<%dp" % min(MAX_STRING_LEN, lpassword + 1), self.password.encode()
f"<{min(MAX_STRING_LEN, lpassword + 1)}p", self.password.encode()
)
+ struct.pack("<H", self.port)
+ struct.pack("<l", 0)
Expand Down

0 comments on commit fbeaead

Please sign in to comment.