hgmo: fixup source IP loading for Mozilla IPs (bug 1370420)
authorGregory Szorc <gps@mozilla.com>
Fri, 01 Dec 2017 11:46:30 -0500
changeset 5644 ac135b39813b65d722035b1eaa238b102e63f8ac
parent 5643 575241ed4b5b297881c3cee451a7c39c39babc15
child 5645 81e4d2af952018b4553d31cac5f89b8214697b58
push id2600
push usergszorc@mozilla.com
push dateFri, 01 Dec 2017 16:46:35 +0000
treeherderversion-control-tools@ac135b39813b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1370420
hgmo: fixup source IP loading for Mozilla IPs (bug 1370420)
hgext/hgmo/__init__.py
--- a/hgext/hgmo/__init__.py
+++ b/hgext/hgmo/__init__.py
@@ -782,17 +782,17 @@ def processbundlesmanifest(orig, repo, p
 
     # Determine if source IP is in a Mozilla network, as we stream results to those addresses
     if mozpath:
         try:
             with open(mozpath, 'rb') as fh:
                 mozdata = fh.read().splitlines()
 
             for ipentry in mozdata:
-                network = ipaddress.IPv4Network(ipentry)
+                network = ipaddress.IPv4Network(ipentry.decode('ascii'))
 
                 # If the source IP is from a Mozilla network, prioritize stream bundles
                 if sourceip in network:
                     origlines = sorted(origlines, cmp=stream_clone_cmp)
                     origlines.append('')
                     return '\n'.join(origlines)
 
         except Exception as e: