diff options
Diffstat (limited to 'src/leap/bitmask/keymanager/keys.py')
-rw-r--r-- | src/leap/bitmask/keymanager/keys.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/leap/bitmask/keymanager/keys.py b/src/leap/bitmask/keymanager/keys.py index 0f68c06b..efc6f925 100644 --- a/src/leap/bitmask/keymanager/keys.py +++ b/src/leap/bitmask/keymanager/keys.py @@ -338,6 +338,8 @@ class OpenPGPKey(object): :return: True if the current date is within the threshold :rtype: Boolean """ + if self.expiry_date is None: + return False days_till_expiry = (self.expiry_date - datetime.now()) return days_till_expiry.days < pre_expiration_threshold |