aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--newspipe/bootstrap.py1
-rw-r--r--newspipe/controllers/user.py4
2 files changed, 1 insertions, 4 deletions
diff --git a/newspipe/bootstrap.py b/newspipe/bootstrap.py
index ac8147c7..9160c857 100644
--- a/newspipe/bootstrap.py
+++ b/newspipe/bootstrap.py
@@ -53,7 +53,6 @@ class ReverseProxied(object):
environ['SCRIPT_NAME'] = self.script_name
return self.app(environ, start_response)
-
# Create Flask application
application = Flask(__name__, instance_relative_config=True)
configuration = os.environ.get("NEWSPIPE_CONFIG", False)
diff --git a/newspipe/controllers/user.py b/newspipe/controllers/user.py
index 77bcc9be..c073ee5f 100644
--- a/newspipe/controllers/user.py
+++ b/newspipe/controllers/user.py
@@ -125,11 +125,9 @@ class LdapuserController(object):
namelist = []
try:
query = dns.resolver.query(f"_ldap._tcp.{domain}","SRV")
- except dns.resolver.NXDOMAIN:
+ except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer):
# no records exist that match the request, so we were probably given a specific hostname, and an empty query will trigger the logic below that will add the original domain to the list.
query = []
- except dns.resolver.NoAnswer:
- query = []
for i in query:
namelist.append(i.target.to_text().rstrip("."))
if not len(namelist):
bgstack15