[gnoduino] fix examples files parsing



commit 9a8d57c288312fa2f45ea31f256d5cd2004cdb1e
Author: Lucian Langa <lucilanga gnome org>
Date:   Mon Aug 27 10:42:16 2012 +0200

    fix examples files parsing

 src/ui.py |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/ui.py b/src/ui.py
index cd1ed58..f28abad 100644
--- a/src/ui.py
+++ b/src/ui.py
@@ -691,10 +691,12 @@ def populateExampleLine(entry, menu):
 		menuItem.set_submenu(subitem)
 		menu.append(menuItem)
 	else:
-		if os.path.basename(os.path.split(entry)[0]) == "examples":
-			menuItem.set_data("file", os.path.join(entry, i))
-			menuItem.connect("activate", exampleProcess)
-			menu.append(menuItem)
+		try:
+			if os.path.basename(os.path.split(entry)[0]) == "examples":
+				menuItem.set_data("file", os.path.join(entry, i))
+				menuItem.connect("activate", exampleProcess)
+				menu.append(menuItem)
+		except: pass
 
 def populateExamples():
 	submenu = gtk.Menu()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]