gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: jakarta-gump/python gumpcore.py
Date Thu, 24 Apr 2003 08:22:50 GMT
nicolaken    2003/04/24 01:22:50

  Modified:    python   gumpcore.py
  Log:
  Basic error handling for non-existant workspace
  
  Revision  Changes    Path
  1.2       +9 -0      jakarta-gump/python/gumpcore.py
  
  Index: gumpcore.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gumpcore.py,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- gumpcore.py	23 Apr 2003 12:27:20 -0000	1.1
  +++ gumpcore.py	24 Apr 2003 08:22:50 -0000	1.2
  @@ -33,6 +33,15 @@
       self.topOfStack=self.elementStack[-1]
   
   def load(file):
  +  if not os.path.exists(file):
  +    print
  +    print 'You need to specify a valid workspace for Gump to run'
  +    print 'If you are new to Gump, simply copy minimal-workspace.xml'
  +    print ' to a file with the name of your computer (mycomputer.xml)'
  +    print ' and rerun this program.'
  +    print
  +    raise IOError, 'workspace '+file+' not found'
  +    
     workspace=SAXDispatcher(file,'workspace',Workspace).docElement
     workspace.complete()
     for module in Module.list.values(): module.complete(workspace)
  
  
  

Mime
View raw message