Skip to content

Commit 8ccbcc5

Browse files
authored
Fix credentials section bug (#30)
1 parent 0450738 commit 8ccbcc5

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.2.5
2+
3+
- [FIXED] Credentials section bug affecting the Slack notifier.
4+
15
# 1.2.4
26

37
- [IMPROVED] Fetchers and checks that failed to load appear as errors in STDERR now.

compliance/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# limitations under the License.
1515
"""Compliance automation package."""
1616

17-
__version__ = '1.2.4'
17+
__version__ = '1.2.5'

compliance/utils/credentials.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ def _getattr_wrapper(t, attr):
8181
logger.debug(
8282
f'Loading credentials from ENV vars: {", ".join(env_vars)}'
8383
)
84-
85-
params = self._cfg.options(section)
84+
params = []
85+
if self._cfg.has_section(section):
86+
params = self._cfg.options(section)
8687
values = [self._cfg.get(section, x) for x in params]
8788

8889
d = OrderedDict(zip(params, values))

0 commit comments

Comments
 (0)