Changeset 055e490 in rtems-source-builder for source-builder/sb/reports.py


Ignore:
Timestamp:
Apr 28, 2013, 6:10:02 AM (6 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, master
Children:
41219dc
Parents:
22afed3
Message:

Fix the report command. Only output if an outname is given.

File:
1 edited

Legend:

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

    r22afed3 r055e490  
    303303        self.config_end(name)
    304304
    305     def buildset(self, name):
     305    def buildset(self, name, opts = None, macros = None):
    306306        self.bset_nesting += 1
    307307        self.buildset_start(name)
    308         opts = copy.copy(self.opts)
    309         macros = copy.copy(self.macros)
     308        if opts is None:
     309            opts = self.opts
     310        if macros is None:
     311            macros = self.macros
    310312        bset = setbuilder.buildset(name, self.configs, opts, macros)
    311313        for c in bset.load():
    312314            if c.endswith('.bset'):
    313                 self.buildset(c)
     315                self.buildset(c, bset.opts, bset.macros)
    314316            elif c.endswith('.cfg'):
    315                 self.config(c, opts, macros)
     317                self.config(c, bset.opts, bset.macros)
    316318            else:
    317319                raise error.general('invalid config type: %s' % (c))
     
    330332            infile.close()
    331333            outfile.close()
    332         try:
    333             o = open(name, "w")
    334             o.write(self.out)
    335             o.close()
    336             del o
    337         except IOError, err:
    338             raise error.general('writing output file: %s: %s' % (name, err))
    339 
    340     def make(self, inname, outname, intro_text = None):
     334        if name is not None:
     335            try:
     336                o = open(name, "w")
     337                o.write(self.out)
     338                o.close()
     339                del o
     340            except IOError, err:
     341                raise error.general('writing output file: %s: %s' % (name, err))
     342
     343    def make(self, inname, outname = None, intro_text = None):
    341344        self.setup()
    342345        self.introduction(inname, intro_text)
Note: See TracChangeset for help on using the changeset viewer.