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

gEDA-cvs: branch: master updated (03ebf45c7cffad293c39b4b39ac67d66a29228a6)



The branch, master has been updated
       via  03ebf45c7cffad293c39b4b39ac67d66a29228a6 (commit)
      from  cc6a558339ddc45a9a4ee52e04c37afddcd7d701 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 src/gedamanager.py |   38 +++++++++++++++++++++-----------------
 src/newproject.py  |    5 ++---
 src/project.py     |    2 +-
 src/settings.py    |    5 +++--
 src/utils.py       |   17 ++++++++++-------
 5 files changed, 37 insertions(+), 30 deletions(-)


=================
 Commit Messages
=================

commit 03ebf45c7cffad293c39b4b39ac67d66a29228a6
Author: Newell Jensen <jensen@xxxxxxxxxxxxxxx>
Date:   Tue Jul 15 19:22:43 2008 -0700

    Checking in changes that I thought I had already checked in.

:100644 100644 fc2f770... 2825426... M	src/gedamanager.py
:100644 100644 bbad142... d12c1a5... M	src/newproject.py
:100644 100644 9acc5ea... 07697c3... M	src/project.py
:100644 100644 7665941... 06ced9e... M	src/settings.py
:100644 100644 6fcc574... bfa10da... M	src/utils.py

=========
 Changes
=========

commit 03ebf45c7cffad293c39b4b39ac67d66a29228a6
Author: Newell Jensen <jensen@xxxxxxxxxxxxxxx>
Date:   Tue Jul 15 19:22:43 2008 -0700

    Checking in changes that I thought I had already checked in.

diff --git a/src/gedamanager.py b/src/gedamanager.py
index fc2f770..2825426 100644
--- a/src/gedamanager.py
+++ b/src/gedamanager.py
@@ -4,8 +4,7 @@
 #Top-level window for the gEDA Manager
 #@author Newell Jensen
 
-import os, sys, gtk, pygtk, yaml, gnomevfs
-import gobject
+import os, sys, gtk, pygtk, yaml, gnomevfs, gobject, shutil
 pygtk.require('2.0')
 from project import *
 from settings import *
@@ -44,7 +43,7 @@ class gEDAManager:
         self.window.set_title('gEDA Manager')
         self.merge_id = 0
         # TODO create gEDA Manager icon
-        self.window.set_icon_from_file('../icons/geda-xgsch2pcb-48.png')
+        self.window.set_icon_from_file('../images/icons/geda-xgsch2pcb-48.png')
         self.window.set_size_request(900,700)
         # Create a Menu UIManager and a Popup UIManager
         self.menu_uimanager = gtk.UIManager()
@@ -75,18 +74,19 @@ class gEDAManager:
             try:
                 gnomevfs.url_show(link)
             except:
-                pass
+                print 'Unexpected error:', sys.exc_info()[0]
+                raise
 
         self.aboutdialog = gtk.AboutDialog()
         self.aboutdialog.set_name("gEDA Manager")
         try:
-            f = open('config.yaml')
+            f = open(os.path.expanduser('~') + '/.gmrc')
             y = yaml.load(f)
             version = y['version']
             self.aboutdialog.set_version(str(version))
             f.close()
         except:
-            pass
+            print 'Unexpected error:', sys.exc_info()[0]
         self.aboutdialog.set_copyright("gEDA Manager 2008")
         self.aboutdialog.set_authors(['Newell Jensen', '--',
                                       'Before Enlightenment, chop wood and carry water',
@@ -95,8 +95,8 @@ class gEDAManager:
         self.aboutdialog.set_website('http://geda.seul.org')
         self.aboutdialog.set_translator_credits('translator-credits')
         self.aboutdialog.set_transient_for(self.window)
-        
-    
+
+
     def __init_menus__(self):
         """
         Method to create the menu bar.
@@ -355,7 +355,7 @@ class gEDAManager:
         scrolled_window5.add(textview4)
 
         terminal_icon = gtk.Image()
-        terminal_icon.set_from_file('../icons/terminal.jpg')
+        terminal_icon.set_from_file('../images/icons/terminal.jpg')
         terminal_icon.show()
         notebook.set_tab_label(notebook.get_nth_page(2), terminal_icon)
 
@@ -710,7 +710,8 @@ class gEDAManager:
         try:
             gnomevfs.url_show('http://geda.seul.org/wiki/')
         except:
-            pass
+            print 'Unexpected error:', sys.exc_info()[0]
+            raise
 
 
     def cb_url_geda_documentation(self, menuitem, data=None):
@@ -722,7 +723,8 @@ class gEDAManager:
         try:
             gnomevfs.url_show('http://geda.seul.org/wiki/geda:documentation')
         except:
-            pass
+            print 'Unexpected error:', sys.exc_info()[0]
+            raise
 
 
     def cb_url_geda_manager(self, menuitem, data=None):
@@ -734,7 +736,8 @@ class gEDAManager:
         try:
             gnomevfs.url_show('http://www.gempillar.com')
         except:
-            pass
+            print 'Unexpected error:', sys.exc_info()[0]
+            raise
 
 
     # File Menu #
@@ -1124,7 +1127,7 @@ class gEDAManager:
         f = os.path.exists(path)
         try:
             if f: # delete directory recursively
-                remove_tree(path)
+                shutil.rmtree(path)
                 flag = True
                 i = 0
                 while flag:
@@ -1137,11 +1140,12 @@ class gEDAManager:
                                 flag = False
                     i = i + 1
             os.mkdir(path)
-        except IOError:
-            'IOError: ', sys.exc_info()[0]
+        except IOError, detail:
+            print 'IOError:', detail
         except:
-            print 'Unexpected error: ', sys.exc_info()[0]
-
+            print 'Unexpected error:', sys.exc_info()[0]
+            raise
+        
         name = self.utils.get_node_name(path)
         # Find out what file it is so we can pick an icon for it
         image = self.utils.get_node_image(name)
diff --git a/src/newproject.py b/src/newproject.py
index bbad142..d12c1a5 100644
--- a/src/newproject.py
+++ b/src/newproject.py
@@ -4,10 +4,9 @@
 #New Project window for the gEDA Manager
 #@author Newell Jensen
 
-import os, sys, pygtk, gtk, yaml
+import os, sys, pygtk, gtk, yaml, shutil
 pygtk.require('2.0')
 from project import *
-from distutils.dir_util import remove_tree
 
 class NewProject:
     """
@@ -268,7 +267,7 @@ class NewProject:
             self.project.directory = self.get_path() + '/' + self.project.name.split('.')[0]
             # Remove directories with imported remove_tree
             if self.confirm_overwrite.get_active():
-                remove_tree(self.project.directory)
+                shutil.rmtree(self.project.directory)
 
             os.mkdir(self.project.directory)
             # The file_list is populated in the gedamanager
diff --git a/src/project.py b/src/project.py
index 9acc5ea..07697c3 100644
--- a/src/project.py
+++ b/src/project.py
@@ -51,7 +51,7 @@ class Project(gobject.GObject):
             except yaml.YAMLError, exc:
                 if hasattr(exc, 'problem_mark'):
                     mark = exc.problem_mark
-                    print 'There is an error in the' + path  + 'file'
+                    print 'There is an error in the' + path  + 'file.\n'
                     print "Error position: (%s:%s)" % (mark.line+1, mark.column+1)
                     exit(-1)
 
diff --git a/src/settings.py b/src/settings.py
index 7665941..06ced9e 100644
--- a/src/settings.py
+++ b/src/settings.py
@@ -32,7 +32,7 @@ class Settings:
         except yaml.YAMLError, exc:
             if hasattr(exc, 'problem_mark'):
                 mark = exc.problem_mark
-                print "There is an error in the .gmrc file"
+                print "There is an error in the .gmrc file.\n"
                 print "Error position: (%s:%s)" % (mark.line+1, mark.column+1)
             exit(-1)
 
@@ -86,7 +86,8 @@ class Settings:
             try:
                 apps.append(geda_app[1])
             except IndexError:
-                pass
+                print 'IndexError:', sys.exc_info()[0]
+                raise
         return apps
 
     
diff --git a/src/utils.py b/src/utils.py
index 6fcc574..bfa10da 100644
--- a/src/utils.py
+++ b/src/utils.py
@@ -69,9 +69,10 @@ class Utils:
         try:
             current_directory = os.getcwd()
         except OSError:
-            print 'OSError: ', sys.exc_info()[0]
+            print 'OSError:', sys.exc_info()[0]
         except:
-            print 'Unexpected error: ', sys.exc_info[0]
+            print 'Unexpected error:', sys.exc_info[0]
+            raise
 
         os.chdir(self.directory)
         if '.' in filename:
@@ -90,9 +91,10 @@ class Utils:
         try:
             current_directory = os.getcwd()
         except OSError:
-            print 'OSError: ', sys.exc_info[0]
+            print 'OSError:', sys.exc_info[0]
         except:
-            print 'Unexpected error: ', sys.exc_info[0]
+            print 'Unexpected error:', sys.exc_info[0]
+            raise
 
         os.chdir(self.directory)            
         if name == 'project':
@@ -193,11 +195,12 @@ class Utils:
                     os.system('rm -rf ' + selected_node)
                     g.sources.remove(selection_iter)
         except IOError:
-            'IOError: ', sys.exc_info()[0]
+            print 'IOError:', sys.exc_info()[0]
         except OSError:
-            print 'OSError: ', sys.exc_info[0]
+            print 'OSError:', sys.exc_info[0]
         except:
-            print 'Unexpected error: ', sys.exc_info()[0]            
+            print 'Unexpected error:', sys.exc_info()[0]
+            raise
             
         # Project's File List
         project_file = g.project.directory + '/' + g.project.name




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs