Changeset 5700

Show
Ignore:
Timestamp:
11/17/08 15:32:06 (2 months ago)
Author:
faide
Message:

Exit from the toolbox command line if turbokid is not available since the whole toolbox depends on its presence... We could implement this better, we could do a lot of things... I hack it this way. It works and it will help people out there avoid the cryptic error messages I got that never talked about turbokid and only about Kid. Sorry for the long commit message, this was the first nervous expression of the day, other ones may follow. :p

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/turbogears/command/base.py

    r5547 r5700  
    301301        from turbogears import toolbox 
    302302 
     303        # TODO: remove this check once we convert the whole toolbox to genshi 
     304        try: 
     305            import turbokid 
     306        except ImportError: 
     307            # we could not import turbokid, the toolbox will crash with 
     308            # horrible tracebacks... 
     309            print "Please easy_install turbokid, toolbox cannot run without it" 
     310            # sys exit with different than zero error code in case someone 
     311            # is using the error code to know if it worked... 
     312            sys.exit(2) 
     313 
    303314        # Make sure we have full configuration with every option 
    304315        # in it so other plugins or whatever find what they need