Skip to content

Commit

Permalink
Fix missed code deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Dec 11, 2023
1 parent 6f820fa commit 8597b4e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
- Summary:
- Insert something here

## Version: 0.1.8

- Released: 2023-12-11
- Summary:
- Fix missed code deletion

## Version: 0.1.7

- Released: 2023-12-11
Expand Down
17 changes: 1 addition & 16 deletions ciscoconfparse2/ccp_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def text(self):
def text(self, val):
is_comment = getattr(self, 'is_comment', None)
if isinstance(val, str):
self._text = val
self._text = self.safe_escape_curly_braces(val)
self.line_id = self.calculate_line_id()

if is_comment is True:
Expand Down Expand Up @@ -448,21 +448,6 @@ def as_diff_dict(self):
}
return retval

# escape braces since single braces could be misunderstood as
# f-string or string.format() delimiters...
#
# Sometimes brace escaping is not required... we need better fencing
# around safe_escape_curly_braces()
newtext = self.safe_escape_curly_braces(newtext)

# Remove all double-spacing, except for the indent spaces...
self.line_id = self.calculate_line_id()

if self.is_comment is True:
# VERY IMPORTANT: due to old behavior, comment parents MUST be self
#
self.parent = self

# On BaseCfgLine()
@logger.catch(reraise=True)
def safe_escape_curly_braces(self, text):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ requires-python = ">=3.8.0"

[tool.poetry]
name = "ciscoconfparse2"
version = "0.1.7"
version = "0.1.8"
description = "Parse, Audit, Query, Build, and Modify Cisco IOS-style and JunOS-style configs"
license = "GPL-3.0-only"
authors = [
Expand Down

0 comments on commit 8597b4e

Please sign in to comment.