Changeset 348e498 in rtems-source-builder


Ignore:
Timestamp:
Sep 2, 2013, 9:59:38 PM (6 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, master
Children:
72f89c5
Parents:
a4937d8
Message:

sb: Add options log_info.

Provide a log_info method for the options class to log the command line
and the python version string.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/options.py

    ra4937d8 r348e498  
    3535import path
    3636import sys
     37
     38import version
    3739
    3840basepath = 'sb'
     
    461463        return self.opts['no-download'] != '0'
    462464
     465    def log_info(self):
     466        log.output(' Command Line: %s' % (' '.join(self.argv)))
     467        log.output(' Python: %s' % (sys.version.replace('\n', '')))
     468
    463469def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc'):
    464470    """
     
    527533    o.post_process()
    528534
    529     log.notice(' '.join(args))
    530 
    531535    return o
    532536
     
    534538    try:
    535539        _opts = load(args = args, defaults = 'defaults.mc')
    536         print 'Options:'
    537         print _opts
    538         print 'Defaults:'
    539         print _opts.defaults
     540        log.notice('RTEMS Source Builder - Defaults, v%s' % (version.str()))
     541        _opts.log_info()
     542        log.notice('Options:')
     543        log.notice(str(_opts))
     544        log.notice('Defaults:')
     545        log.notice(str(_opts.defaults))
    540546    except error.general, gerr:
    541547        print gerr
Note: See TracChangeset for help on using the changeset viewer.