From: Naelson Douglas Date: Sun, 24 Oct 2021 17:06:53 +0000 (-0300) Subject: removed a manual indexer iterator pitfall from the code X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=bce4b799207d2f5cdc2004458a558755757cc0da;p=stevenblack-hosts.git removed a manual indexer iterator pitfall from the code --- diff --git a/testUpdateHostsFile.py b/testUpdateHostsFile.py index 1f90e3898..1562bafea 100644 --- a/testUpdateHostsFile.py +++ b/testUpdateHostsFile.py @@ -1605,8 +1605,8 @@ class DomainToIDNA(Base): # Test with multiple tabulations as separator of domain and space and # tabulation as separator or comments. - for i in range(len(self.domains)): - data = (b"0.0.0.0\t\t\t" + self.domains[i] + b" \t # Hello World").decode( + for i, domain in enumerate(self.domains): + data = (b"0.0.0.0\t\t\t" + domain + b" \t # Hello World").decode( "utf-8" ) expected = "0.0.0.0\t\t\t" + self.expected_domains[i] + " \t # Hello World"