aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAyrx <terrycwk1994@gmail.com>2014-03-06 20:59:04 +0800
committerAyrx <terrycwk1994@gmail.com>2014-03-06 21:22:40 +0800
commite4880e6768cf7c2635734a2082ab62d3a416d3ce (patch)
tree52d2d1fd04257d8bda4216ff8e03013ca349b3aa
parent9ec8ed70a3bbbecc43e6c27714042e2abe9a3fc0 (diff)
downloadcryptography-e4880e6768cf7c2635734a2082ab62d3a416d3ce.tar.gz
cryptography-e4880e6768cf7c2635734a2082ab62d3a416d3ce.tar.bz2
cryptography-e4880e6768cf7c2635734a2082ab62d3a416d3ce.zip
Fix drop in coverage levels by removing branches
-rw-r--r--cryptography/hazmat/bindings/commoncrypto/binding.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/cryptography/hazmat/bindings/commoncrypto/binding.py b/cryptography/hazmat/bindings/commoncrypto/binding.py
index 07d9cc6d..e14b8ca3 100644
--- a/cryptography/hazmat/bindings/commoncrypto/binding.py
+++ b/cryptography/hazmat/bindings/commoncrypto/binding.py
@@ -13,7 +13,6 @@
from __future__ import absolute_import, division, print_function
-import sys
import platform
from pkg_resources import parse_version
@@ -49,13 +48,5 @@ class Binding(object):
@classmethod
def is_available(cls):
- if sys.platform == "darwin":
- version = parse_version(platform.mac_ver()[0])
- if version < parse_version("10.8"):
- return False
-
- else:
- return True
-
- else:
- return False
+ version = parse_version(platform.mac_ver()[0])
+ return version >= parse_version("10.8")