def _effective_debug_level(ctx, bundle, extra_filters=None, default=None):
 if (default is None):
  default = ctx.environment.debug
 if (bundle.config.get('debug') is not None):
  level = bundle.config.debug
 else:
  filters = merge_filters(bundle.filters, extra_filters)
  level = ('merge' if select_filters(filters, True) else None)
 if (level is not None):
  if (cmp_debug_levels(default, level) > 0):
   return level
 return default

def _effective_debug_level ( ctx , bundle , extra_filters = None , default = None ) : if ( default is None ) : default = ctx . environment . debug if ( bundle . config . get ( 'debug' ) is not None ) : level = bundle . config . debug else : filters = merge_filters ( bundle . filters , extra_filters ) level = ( 'merge' if select_filters ( filters , True ) else None ) if ( level is not None ) : if ( cmp_debug_levels ( default , level ) > 0 ) : return level return default
this is a helper used both in the urls() and the build() recursions .