You are viewing a plain text version of this content. The canonical link for it is here.
Posted to tashi-commits@incubator.apache.org by mr...@apache.org on 2009/07/09 13:33:26 UTC

svn commit: r792551 - /incubator/tashi/trunk/src/tashi/agents/dhcpdns.py

Author: mryan3
Date: Thu Jul  9 13:33:25 2009
New Revision: 792551

URL: http://svn.apache.org/viewvc?rev=792551&view=rev
Log:
Bug fix -- DNS end DHCP entries were failing to be added if the name did not already exist and reverseDns was turned on


Modified:
    incubator/tashi/trunk/src/tashi/agents/dhcpdns.py

Modified: incubator/tashi/trunk/src/tashi/agents/dhcpdns.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/agents/dhcpdns.py?rev=792551&r1=792550&r2=792551&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/agents/dhcpdns.py (original)
+++ incubator/tashi/trunk/src/tashi/agents/dhcpdns.py Thu Jul  9 13:33:25 2009
@@ -100,8 +100,11 @@
 		return ipString
 	
 	def addDhcp(self, name, ipaddr, hwaddr):
-		self.removeDhcp(name)
-		self.removeDhcp(name, ipaddr)
+		try:
+			self.removeDhcp(name)
+			self.removeDhcp(name, ipaddr)
+		except:
+			pass
 		cmd = "omshell"
 		(stdin, stdout) = os.popen2(cmd)
 		stdin.write("server %s\n" % (self.dhcpServer))
@@ -137,7 +140,10 @@
 		stdout.close()
 	
 	def addDns(self, name, ip):
-		self.removeDns(name)
+		try:
+			self.removeDns(name)
+		except:
+			pass
 		if (self.dnsKeyFile != ""):
 			cmd = "nsupdate -k %s" % (self.dnsKeyFile)
 		else: