Move dns.reversename import to head of models.py

It is necessary because we use this function it the
pretty_ipv6_ptr don't turned on.
This commit is contained in:
SIPOS, Peter 2016-11-16 15:13:02 +01:00
parent f430ed014b
commit 0e8a41f58e

View File

@ -8,6 +8,7 @@ import itertools
import traceback import traceback
import pyotp import pyotp
import re import re
import dns.reversename
from datetime import datetime from datetime import datetime
from distutils.version import StrictVersion from distutils.version import StrictVersion
@ -32,7 +33,6 @@ else:
if 'PRETTY_IPV6_PTR' in app.config.keys(): if 'PRETTY_IPV6_PTR' in app.config.keys():
import dns.inet import dns.inet
import dns.name import dns.name
import dns.reversename
PRETTY_IPV6_PTR = app.config['PRETTY_IPV6_PTR'] PRETTY_IPV6_PTR = app.config['PRETTY_IPV6_PTR']
else: else:
PRETTY_IPV6_PTR = False PRETTY_IPV6_PTR = False