Changeset 6471


Ignore:
Timestamp:
Mar 5, 2009, 2:32:24 PM (16 years ago)
Author:
ole
Message:

Made warning for exceeding time limits dependent on the verbose flag and
also made it a simple print rather than a real warning. This was due to annoyances with stderr being used for something this trivial.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/abstract_2d_finite_volumes/generic_boundary_conditions.py

    r6449 r6471  
    145145               
    146146                if self.default_boundary_invoked is False:
    147                     # Issue warning the first time
    148                     msg = '%s' %str(e)
    149                     msg += 'Instead I will use the default boundary: %s\n'\
    150                         %str(self.default_boundary)
    151                     msg += 'Note: Further warnings will be supressed'
    152                     print msg
     147                    if self.verbose:               
     148                        # Issue warning the first time
     149                        msg = '%s' %str(e)
     150                        msg += 'Instead I will use the default boundary: %s\n'\
     151                            %str(self.default_boundary)
     152                        msg += 'Note: Further warnings will be supressed'
     153                        print msg
    153154               
    154155                    # FIXME (Ole): Replace this crude flag with
     
    334335                    if self.default_boundary_invoked is False:
    335336                        # Issue warning the first time
    336                         msg = '%s' %str(e)
    337                         msg += 'Instead I will use the default boundary: %s\n'\
    338                             %str(self.default_boundary)
    339                         msg += 'Note: Further warnings will be supressed'
    340                         warn(msg)
     337                        if self.verbose:
     338                            msg = '%s' %str(e)
     339                            msg += 'Instead I will use the default boundary: %s\n'\
     340                                %str(self.default_boundary)
     341                            msg += 'Note: Further warnings will be supressed'
     342                            print msg
    341343                   
    342344                        # FIXME (Ole): Replace this crude flag with
Note: See TracChangeset for help on using the changeset viewer.