X-Git-Url: https://git.mdrn.pl/cas.git/blobdiff_plain/77383dd67f20ccdca7d9d3cc071ca386ba6a6ac3..refs/heads/master:/src/ssh_keys/views.py diff --git a/src/ssh_keys/views.py b/src/ssh_keys/views.py index 73ba3e9..f2cda1b 100644 --- a/src/ssh_keys/views.py +++ b/src/ssh_keys/views.py @@ -1,5 +1,4 @@ from datetime import datetime, timedelta -import logging import re from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib import messages @@ -8,7 +7,7 @@ from django.db.models import Q from django import http from django.shortcuts import get_object_or_404 from django.utils.timezone import now -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.decorators.csrf import csrf_exempt from django.views.generic import ListView, CreateView, DeleteView from services.models import Service @@ -48,7 +47,6 @@ class DeleteSSHKeyView(LoginRequiredMixin, DeleteView): @csrf_exempt def ssh_keys_seen(request): - logger = logging.getLogger('django.request') key = request.GET.get('key') service = get_object_or_404(Service, key=key) n = now() @@ -61,8 +59,7 @@ def ssh_keys_seen(request): continue data = parse_log_line(line) if data is None: - logger.error('Unparsed: ' + line) - break + continue dt = data['datetime'] algo = data['algo'] if 'md5' in data: