From 252a7e5d0bd174b33d83e4973dc33794af3d7f1d Mon Sep 17 00:00:00 2001
From: Thomas Waldmann
Date: Sun, 27 Oct 2013 13:34:56 +0100
Subject: [PATCH] fix some stuff the pycharm code checker found
it also thought the db param of init_db is not needed, but it is, added a comment there
---
conftest.py | 2 +-
nsupdate/api/views.py | 2 --
nsupdate/main/dnstools.py | 1 -
nsupdate/main/templates/main/host.html | 12 ++++++------
nsupdate/main/views.py | 2 --
nsupdate/settings.py | 1 -
6 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/conftest.py b/conftest.py
index 2cd5dfb..7eb12ed 100644
--- a/conftest.py
+++ b/conftest.py
@@ -30,7 +30,7 @@ from django.utils.translation import activate
# Note: fixture must be "function" scope (default), see https://github.com/pelme/pytest_django/issues/33
@pytest.fixture(autouse=True)
-def db_init(db):
+def db_init(db): # note: db is a predefined fixture and required here to have the db available
"""
Init the database contents for testing, so we have a service domain, ...
"""
diff --git a/nsupdate/api/views.py b/nsupdate/api/views.py
index 18c0463..0e3a22f 100644
--- a/nsupdate/api/views.py
+++ b/nsupdate/api/views.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import os
-
import logging
logger = logging.getLogger(__name__)
diff --git a/nsupdate/main/dnstools.py b/nsupdate/main/dnstools.py
index 745191e..598c8ca 100644
--- a/nsupdate/main/dnstools.py
+++ b/nsupdate/main/dnstools.py
@@ -27,7 +27,6 @@ import dns.update
import dns.tsig
import dns.tsigkeyring
-from django.conf import settings
from django.utils.timezone import now
diff --git a/nsupdate/main/templates/main/host.html b/nsupdate/main/templates/main/host.html
index 8a7e4de..0df555f 100644
--- a/nsupdate/main/templates/main/host.html
+++ b/nsupdate/main/templates/main/host.html
@@ -36,17 +36,17 @@
We populated the input fields for the new addresses with your currently detected remote addresses.
-
+
-
+
-
+
-
+
@@ -59,7 +59,7 @@
}).fail(function( data ) {
$('#update_result_v4').text('error');
});
- }
+ };
update_host_v6 = function(host) {
$('#update_result_v6').text('updating...');
$.get( "{% url 'nic_update_authorized' %}", { myip: $('#myipv6').val(), hostname: host } )
@@ -68,7 +68,7 @@
}).fail(function( data ) {
$('#update_result_v6').text('error');
});
- }
+ };
diff --git a/nsupdate/main/views.py b/nsupdate/main/views.py
index 4f68865..6fca1fb 100644
--- a/nsupdate/main/views.py
+++ b/nsupdate/main/views.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import dns.inet
-
from django.db.models import Q
from django.views.generic import TemplateView, CreateView
from django.views.generic.edit import UpdateView, DeleteView
diff --git a/nsupdate/settings.py b/nsupdate/settings.py
index 81f2b11..ac579f2 100644
--- a/nsupdate/settings.py
+++ b/nsupdate/settings.py
@@ -3,7 +3,6 @@ Django settings for nsupdate project
"""
import os
-import dns.tsig
import django.conf.global_settings as DEFAULT_SETTINGS
# Use a unique, long, random, secret string here.