Skip to content

Commit

Permalink
Merge pull request #271 from ThomasWaldmann/fix-hostadd-sameip-crash
Browse files Browse the repository at this point in the history
fix SameIpError in host add form processing, fixes #267
  • Loading branch information
ThomasWaldmann committed Aug 13, 2016
2 parents 0baa8b8 + 9f97cb2 commit 9d30ca1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nsupdate/main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ def form_valid(self, form):
except Domain.DoesNotExist:
# should not happen: POST data had invalid (base)domain
success, level, msg = False, messages.ERROR, 'Base domain does not exist.'
except dnstools.SameIpError:
success, level, msg = False, messages.ERROR, 'Host already exists in DNS.'
except socket.error as err:
success, level, msg = False, messages.ERROR, 'Communication to name server failed [%s]' % str(err)
else:
Expand Down

0 comments on commit 9d30ca1

Please sign in to comment.