@@ -147,13 +147,13 @@ def Current():
147147 """
148148 if os .name == 'nt' :
149149 return OperatingSystem .WINDOWS
150- elif 'linux' in sys .platform :
150+ if 'linux' in sys .platform :
151151 return OperatingSystem .LINUX
152- elif 'darwin' in sys .platform :
152+ if 'darwin' in sys .platform :
153153 return OperatingSystem .MACOSX
154- elif 'cygwin' in sys .platform :
154+ if 'cygwin' in sys .platform :
155155 return OperatingSystem .CYGWIN
156- elif 'msys' in sys .platform :
156+ if 'msys' in sys .platform :
157157 return OperatingSystem .MSYS
158158 return None
159159
@@ -323,12 +323,12 @@ def UserAgentFragment(self):
323323 # '#1 SMP Tue May 21 02:35:06 PDT 2013', 'x86_64', 'x86_64')
324324 return '({name} {version})' .format (
325325 name = self .operating_system .name , version = platform .release ())
326- elif self .operating_system == OperatingSystem .WINDOWS :
326+ if self .operating_system == OperatingSystem .WINDOWS :
327327 # ('Windows', '<hostname goes here>', '7', '6.1.7601', 'AMD64',
328328 # 'Intel64 Family 6 Model 45 Stepping 7, GenuineIntel')
329329 return '({name} NT {version})' .format (
330330 name = self .operating_system .name , version = platform .version ())
331- elif self .operating_system == OperatingSystem .MACOSX :
331+ if self .operating_system == OperatingSystem .MACOSX :
332332 # ('Darwin', '<hostname goes here>', '12.4.0',
333333 # 'Darwin Kernel Version 12.4.0: Wed May 1 17:57:12 PDT 2013;
334334 # root:xnu-2050.24.15~1/RELEASE_X86_64', 'x86_64', 'i386')
@@ -337,8 +337,7 @@ def UserAgentFragment(self):
337337 if self .architecture == Architecture .ppc else 'Intel' )
338338 return format_string .format (
339339 name = arch_string , version = platform .release ())
340- else :
341- return '()'
340+ return '()'
342341
343342 def AsyncPopenArgs (self ):
344343 """Returns the args for spawning an async process using Popen on this OS.
@@ -413,10 +412,9 @@ def SupportedVersionMessage(self, allow_py3):
413412 PythonVersion .MIN_SUPPORTED_PY2_VERSION [1 ],
414413 PythonVersion .MIN_SUPPORTED_PY3_VERSION [0 ],
415414 PythonVersion .MIN_SUPPORTED_PY3_VERSION [1 ])
416- else :
417- return 'Please use Python version {0}.{1}.x.' .format (
418- PythonVersion .MIN_SUPPORTED_PY2_VERSION [0 ],
419- PythonVersion .MIN_SUPPORTED_PY2_VERSION [1 ])
415+ return 'Please use Python version {0}.{1}.x.' .format (
416+ PythonVersion .MIN_SUPPORTED_PY2_VERSION [0 ],
417+ PythonVersion .MIN_SUPPORTED_PY2_VERSION [1 ])
420418
421419 def IsCompatible (self , allow_py3 = False , raise_exception = False ):
422420 """Ensure that the Python version we are using is compatible.
0 commit comments