Skip to content

Commit

Permalink
Silenced output noise. (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
MahatmaCane authored and pelson committed Aug 9, 2016
1 parent 78cf189 commit 90fc7d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions conda_rpms/build_rpm_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from git import Repo, Commit
import yaml

import logging
import generate
import install as conda_install

Expand Down Expand Up @@ -138,9 +139,7 @@ def create_rpmbuild_for_tag(repo, tag_name, target, config):
raise ValueError("The tag '{}' doesn't have an environment specification.".format(tag_name))
with open(spec_fname, 'r') as fh:
env_spec = yaml.safe_load(fh).get('env', [])

create_rpmbuild_for_env(manifest, target, config)

pkgs = [pkg for _, pkg in manifest]
env_name, tag = tag_name.split('-')[1:]
fname = '{}-env-{}-tag-{}.spec'.format(rpm_prefix, env_name, tag)
Expand Down Expand Up @@ -217,6 +216,13 @@ def configure_parser(parser):


def handle_args(args):
# To reduce the noise coming from conda/conda-build we set
# all loggers to WARN level.
logging.getLogger('').setLevel(logging.WARNING)
for logger_name in logging.Logger.manager.loggerDict.keys():
logger = logging.getLogger(logger_name)
logger.setLevel(logging.WARNING)

config = Config(args.config)
with tempdir() as repo_directory:
repo = Repo.clone_from(args.repo_uri, repo_directory)
Expand Down

0 comments on commit 90fc7d0

Please sign in to comment.