Moved the Python3 test earlier.
authorSteven Black <redacted>
Thu, 24 Mar 2016 03:36:47 +0000 (23:36 -0400)
committerSteven Black <redacted>
Thu, 24 Mar 2016 03:36:47 +0000 (23:36 -0400)
updateHostsFile.py

index a86ddb619170bbb330e9ee755fa243e819c63cb5..d8d154ede530d181fe81efb7db7e58e7c799d40b 100644 (file)
@@ -25,6 +25,7 @@ import glob
 import argparse
 import socket
 import json
+
 # zip files are not used actually, support deleted
 # StringIO is not needed in Python 3
 # Python 3 works differently with urlopen
@@ -39,6 +40,9 @@ except ImportError:
     from urllib import urlencode
     from urllib2 import urlopen, Request, HTTPError
 
+# Detecting Python 3 for version-dependent implementations
+Python3 = sys.version_info >= (3,0)
+
 # This function handles both Python 2 and Python 3
 def getFileByUrl(url):
     try:
@@ -50,9 +54,6 @@ def getFileByUrl(url):
 
 # In Python 3   "print" is a function, braces are added everywhere
 
-# Detecting Python 3 for version-dependent implementations
-Python3 = sys.version_info >= (3,0)
-
 # This function works in both Python 2 and Python 3
 def myInput(msg = ""):
     if Python3:
git clone https://git.99rst.org/PROJECT