1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-22 18:47:23 +01:00

Merge pull request #1 from captainwasabi/patch-1

add proper check for DNS error in list_target_files
This commit is contained in:
captainwasabi
2019-08-12 12:21:11 -04:00
committed by GitHub

View File

@@ -406,7 +406,7 @@ def list_target_files(config):
reason = "Provided path {} is invalid.".format(target_path)
elif 'Network is unreachable' in listing:
reason = "The IP address {} is unreachable.".format(target.hostname)
elif 'Could not resolve hostname':
elif 'Could not resolve hostname' in listing:
reason = "The hostname {} cannot be resolved.".format(target.hostname)
else:
reason = "Unknown error." \