Fix link to lost item

"Garth T Kidd" <garth-OnzZ1s1DREKDegMON/[email protected]> Mon, 12 Jul 2004 10:59:55 +1000
Newsgroups gmane.comp.pythin.pyds.devel
Organization Deadly Bloody Serious
Message-ID <[email protected]>
Problem: 

If you delete a weblog post to which you'd referred in another item, and
then re-render that item, you'll get an exception -- WeblogTool will raise
ValueError, whilst MeshTool is waiting for KeyError. 

Fix:

Have MeshTool catch ValueError, also. See enclosed diff. 

Regards,
Garth.
20040712-1056-lostlinkfix.diff (application/octet-stream, 772 B)
Index: PyDS/MeshTool.py
===================================================================
RCS file: /pyds/PyDS/PyDS/MeshTool.py,v
retrieving revision 1.24
diff -c -r1.24 MeshTool.py
*** PyDS/MeshTool.py	6 Jul 2004 08:30:36 -0000	1.24
--- PyDS/MeshTool.py	12 Jul 2004 00:55:04 -0000
***************
*** 409,415 ****
  					return previousDestination.getDesktopDisplayLinkDetails()
  				else: 
  					return previousDestination.getCloudLinkDetails()
! 			except KeyError: 
  				pass
  
  		# Gather list of potential matches. 
--- 409,415 ----
  					return previousDestination.getDesktopDisplayLinkDetails()
  				else: 
  					return previousDestination.getCloudLinkDetails()
! 			except (KeyError, ValueError): 
  				pass
  
  		# Gather list of potential matches.