Skip to content

Commit

Permalink
Fixed build and metadata unhandled exception
Browse files Browse the repository at this point in the history
- Fixed bug with metadata handling (could impact 'rest-publish')
- Fixed build issue:  Latest version of 'lxml' dropped support for Python 3.4,
  so we now have pinned the 4.3.x version.
- Placed the word "autocomplete" in the docs for searching reasons.
  • Loading branch information
lowell80 committed Aug 15, 2019
1 parent 22290e1 commit 1a29392
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Release v0.7.6 (DRAFT)
~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Fresh review and cleanup of all docs! (A huge thank you to Brittany Barnett for this massive undertaking)

- Fixed unhandled exception when encountering a global stanza in metadata files.

Release v0.7.5 (2019-07-03)
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
3 changes: 2 additions & 1 deletion docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ Quick Install
Enable Bash Completion
~~~~~~~~~~~~~~~~~~~~~~

If you're on Mac or Linux, and would like to enable bash completion, run these commands:
Context-aware autocomplete can be a great time saver.
If you're on a Mac or Linux, and would like to enable bash completion, run these commands:

.. code-block:: sh
Expand Down
9 changes: 6 additions & 3 deletions ksconf/conf/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

from ksconf.ext.six.moves.urllib.parse import quote, unquote

from ksconf.conf.parser import parse_conf
from ksconf.conf.parser import parse_conf, GLOBAL_STANZA



Expand Down Expand Up @@ -147,9 +147,12 @@ def feed_file(self, stream):

def feed_conf(self, conf):
for stanza_name, stanza_data in conf.items():
parts = [ unquote(p) for p in stanza_name.split("/") ]
if len(parts) == 1 and parts[0] in ("", "default", "global"):
if stanza_name is GLOBAL_STANZA:
parts = []
else:
parts = [unquote(p) for p in stanza_name.split("/")]
if len(parts) == 1 and parts[0] in (GLOBAL_STANZA, "", "default", "global"):
parts = []
meta_layer = self.get_layer(*parts)
meta_layer.update(stanza_data)

Expand Down
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
entrypoints
mock; python_version < '3.3'
splunk-sdk
lxml

# Use old version of 'lxml' to keep 3.4 support for a bit longer (not strictly required)
lxml; python_version !='3.4'
lxml>=4.3,<4.4; python_version=='3.4.*'

0 comments on commit 1a29392

Please sign in to comment.