From df92b8ae5fd4c3bb46f3c62b8ef1a026b44e701e Mon Sep 17 00:00:00 2001 From: Jeremy Crafts Date: Thu, 19 May 2016 12:44:56 -0400 Subject: [PATCH] INSIGHTS-1608 import branch info from stdin if necessary --- etc/redhat-access-insights.spec | 4 ++-- redhat_access_insights/__init__.py | 3 +++ redhat_access_insights/constants.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/etc/redhat-access-insights.spec b/etc/redhat-access-insights.spec index d5529f7..05b4ae9 100644 --- a/etc/redhat-access-insights.spec +++ b/etc/redhat-access-insights.spec @@ -3,8 +3,8 @@ Name: redhat-access-insights Summary: Uploads Insights information to Red Hat on a periodic basis -Version: 1.0.10 -Release: 2%{?dist} +Version: 1.0.11 +Release: 0%{?dist} Source0: https://github.com/redhataccess/insights-client/archive/redhat-access-insights-%{version}.tar.gz Epoch: 0 License: GPLv2+ diff --git a/redhat_access_insights/__init__.py b/redhat_access_insights/__init__.py index 5533fce..2a4ca68 100644 --- a/redhat_access_insights/__init__.py +++ b/redhat_access_insights/__init__.py @@ -217,6 +217,9 @@ def collect_data_and_upload(config, options, rc=0): ('uploader.json' not in stdin_config or 'sig' not in stdin_config)): raise ValueError + if ((options.from_file or options.from_stdin) and + 'branch_info' in stdin_config and stdin_config['branch_info'] is not None): + branch_info = stdin_config['branch_info'] except: logger.error('ERROR: Invalid config for %s! Exiting...' % ('--from-file' if options.from_file else '--from-stdin')) diff --git a/redhat_access_insights/constants.py b/redhat_access_insights/constants.py index e5cadee..67f4074 100644 --- a/redhat_access_insights/constants.py +++ b/redhat_access_insights/constants.py @@ -6,7 +6,7 @@ class InsightsConstants(object): app_name = 'redhat-access-insights' - version = '1.0.10' + version = '1.0.11' auth_method = 'BASIC' log_level = 'DEBUG' package_path = os.path.dirname(