# HG changeset patch
# User Edouard Tisserant
# Date 1337611257 -7200
# Node ID cee825fbe9b3f272d82e5005ec733ae4ac65712a
# Parent  90dcb47a99eda304885b5d4accdba192a0b6a249
fixed exception when launching discovery dialog without network

diff -r 90dcb47a99ed -r cee825fbe9b3 ProjectController.py
--- a/ProjectController.py	Mon May 21 11:00:57 2012 +0200
+++ b/ProjectController.py	Mon May 21 16:40:57 2012 +0200
@@ -1257,11 +1257,14 @@
 
         # if uri is empty launch discovery dialog
         if uri == "":
-            # Launch Service Discovery dialog
-            dialog = DiscoveryDialog(self.AppFrame)
-            answer = dialog.ShowModal()
-            uri = dialog.GetURI()
-            dialog.Destroy()
+            try:
+                # Launch Service Discovery dialog
+                dialog = DiscoveryDialog(self.AppFrame)
+                answer = dialog.ShowModal()
+                uri = dialog.GetURI()
+                dialog.Destroy()
+            except:
+                uri = None
             
             # Nothing choosed or cancel button
             if uri is None or answer == wx.ID_CANCEL: