Changeset c2237e


Ignore:
Timestamp:
07/31/07 00:54:12 (6 years ago)
Author:
Tiago de Paula Peixoto <tiago@…>
Children:
053fc5
Parents:
297f60
git-author:
Tiago de Paula Peixoto <tiago@…> (07/31/07 00:54:12)
git-committer:
Tiago de Paula Peixoto <tiago@…> (07/31/07 00:54:12)
Message:
        * src/graph-tool: added better error handling (output to stderr, cleaner information, return error status)  

        * src/graph/graph_bind.cc: added license info

        * src/graph-tool: added python metadata


git-svn-id: https://svn.forked.de/graph-tool/trunk@117 d4600afd-f417-0410-95de-beed9576f240
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r297f60 rc2237e  
     12007-07-30  Tiago de Paula Peixoto  <tiago@forked.de> 
     2 
     3    * src/graph-tool: added better error handling (output to stderr, cleaner information, return error status)   
     4 
     5    * src/graph/graph_bind.cc: added license info 
     6 
     7    * src/graph-tool: added python metadata 
     8 
    192007-07-29  Tiago de Paula Peixoto  <tiago@forked.de> 
    210 
  • src/graph-tool

    raa8062 rc2237e  
    1818# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA 
    1919 
     20__author__="Tiago de Paula Peixoto <tiago@forked.de>" 
     21__copyright__="Copyright 2007 Tiago de Paula Peixoto" 
     22__license__="GPL version 3 or above" 
     23__URL__="http://graph-tool.forked.de" 
     24 
    2025import sys 
    2126 
     
    2328 
    2429from libgraph_tool import * 
     30__version__= mod_info().version 
    2531 
    2632from optparse import * 
     
    3642import time 
    3743import signal 
     44import traceback 
    3845from time import * 
    3946from math import * 
     
    831838            if len(expressions) > 1: 
    832839                exec expressions[0] in edit_vars 
    833                 exec open(os.path.expanduser(expressions[1].strip())).read() in edit_vars 
    834             else: 
    835                 exec open(os.path.expanduser(expressions[0].strip())).read() in edit_vars     
     840                exp_file = expressions[1] 
     841            else: 
     842                exp_file = expressions[0]             
     843            exec open(os.path.expanduser(exp_file.strip())).read() in edit_vars 
    836844            edit_function = edit_vars["edit_function"] 
    837845        else: 
     
    10751083             
    10761084except (OptionError, HistoryException, IOError, RuntimeError), e: 
    1077     print "graph-tool error:", e 
     1085    print >> sys.stderr, "graph-tool error:", e 
     1086    sys.exit(1) 
    10781087except KeyboardInterrupt: 
    1079     pass 
     1088    print >> sys.stderr, "graph-tool error: Keyboard interrupt." 
     1089    sys.exit(1) 
     1090except: 
     1091    (file_name, line, function, text) = traceback.extract_tb(sys.exc_info()[2])[-1] 
     1092    print >> sys.stderr, "graph-tool unknown error: ", sys.exc_info()[1], "[traceback: File %s, line %d, in %s (text: %s)]" % (file_name, line, function, str(text)) 
     1093    sys.exit(1) 
  • src/graph/graph_bind.cc

    raa8062 rc2237e  
    206206    string GetCopyright() const {return COPYRIGHT;} 
    207207    string GetVersion()   const {return VERSION " (r" SVN_REVISION ")";} 
     208    string GetLicense()   const {return "GPL version 3 or above";} 
    208209}; 
    209210 
     
    308309        .add_property("author", &LibInfo::GetAuthor) 
    309310        .add_property("copyright", &LibInfo::GetCopyright) 
    310         .add_property("version", &LibInfo::GetVersion); 
     311        .add_property("version", &LibInfo::GetVersion) 
     312        .add_property("license", &LibInfo::GetLicense); 
    311313} 
Note: See TracChangeset for help on using the changeset viewer.