Skip to content

Commit

Permalink
py/test/selenium/webdriver/common/network.py: remove python 2 code (#…
Browse files Browse the repository at this point in the history
…14502)

* java/cookie: escape cookie values when required

* add xss escaping

* Fix formatting

* use string builder

* py/test/webdriver/network.py: remove python 2 code

* remove java code

* restore

---------

Co-authored-by: Puja Jagani <[email protected]>
Co-authored-by: Sri Harsha <[email protected]>
  • Loading branch information
3 people authored Oct 1, 2024
1 parent e455840 commit d1836b2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions py/test/selenium/webdriver/common/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@

def get_interface_ip(ifname):
def _bytes(value, encoding):
try:
return bytes(value, encoding) # Python 3
except TypeError:
return value # Python 2
return bytes(value, encoding)

sckt = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(
Expand Down

0 comments on commit d1836b2

Please sign in to comment.