remove version_info based branching

This commit is contained in:
Joshua Li
2020-06-02 19:53:46 -07:00
committed by Brian May
parent ec2018d664
commit d0f0aa9f17
4 changed files with 6 additions and 24 deletions

View File

@ -228,12 +228,7 @@ class FirewallClient:
pass
self.argv = argv
s1.close()
if sys.version_info < (3, 0):
# python 2.7
self.pfile = s2.makefile('wb+')
else:
# python 3.5
self.pfile = s2.makefile('rwb')
self.pfile = s2.makefile('rwb')
if e:
log('Spawning firewall manager: %r\n' % self.argv)
raise Fatal(e)

View File

@ -5,16 +5,11 @@ import errno
logprefix = ''
verbose = 0
if sys.version_info[0] == 3:
binary_type = bytes
binary_type = bytes
def b(s):
return s.encode("ASCII")
else:
binary_type = str
def b(s):
return s
def b(s):
return s.encode("ASCII")
def log(s):