def do_accounting(self, canarydrop=None): try: alert_count = int( lookup_canarytoken_alert_count(canarydrop.canarytoken)) + 1 except TypeError: alert_count = 1 save_canarytoken_alert_count(canarydrop.canarytoken, alert_count, self.alert_expiry)
def do_accounting(self, canarydrop=None): try: alert_count = int(lookup_canarytoken_alert_count( canarydrop.canarytoken))+1 except TypeError: alert_count = 1 save_canarytoken_alert_count(canarydrop.canarytoken, alert_count, self.alert_expiry)
def can_send_alert(self, canarydrop=None): try: alert_count = int( lookup_canarytoken_alert_count(canarydrop.canarytoken)) except TypeError: return True if alert_count + 1 <= self.alert_limit: return True return False
def can_send_alert(self, canarydrop=None): try: alert_count = int(lookup_canarytoken_alert_count( canarydrop.canarytoken)) except TypeError: return True if alert_count + 1 <= self.alert_limit: return True return False