Skip to content

Commit

Permalink
Remove debugging print() statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Dec 11, 2023
1 parent 8597b4e commit feaaa64
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 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.9

- Released: 2023-12-11
- Summary:
- Remove debugging print() statements

## Version: 0.1.8

- Released: 2023-12-11
Expand Down
6 changes: 0 additions & 6 deletions ciscoconfparse2/ccp_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,6 @@ def append_to_family(self, insertstr, indent=-1, auto_indent=False):
# self.confobj.index(foo), which is rather fragile with
# this UserList...
_idx = self.linenum + len(self.children) + 1
print(" ->PEAR", newobj)
retval = self.confobj.insert(_idx, newobj)

if self.classify_family_indent(insertstr) == 0:
Expand All @@ -1031,7 +1030,6 @@ def append_to_family(self, insertstr, indent=-1, auto_indent=False):

elif len(self.all_children) > 0 and len(self.children) == 0:

print(" ->CHAIR", newobj)
_idx = self.linenum + 1
retval = self.confobj.insert(_idx, newobj)
insertstr_family_indent = self.classify_family_indent(insertstr)
Expand All @@ -1051,18 +1049,15 @@ def append_to_family(self, insertstr, indent=-1, auto_indent=False):
#######################################################
# Append a sibling for the children
#######################################################
print(" ->FAIR", newobj)
_idx = self.linenum + len(self.children)

elif insertstr_family_indent > self.classify_family_indent(self.text):
#######################################################
# Insert a child... do the children have children?
#######################################################
if len(self.children[-1].children) > 0:
print(" ->ERR", newobj)
_idx = self.linenum + len(self.all_children) + 1
else:
print(" ->TEAR", newobj)
_idx = self.linenum + len(self.children) + 1

elif insertstr_family_indent < self.classify_family_indent(self.text):
Expand Down Expand Up @@ -1095,7 +1090,6 @@ def append_to_family(self, insertstr, indent=-1, auto_indent=False):
# Use newobj_parent.linenum instead of
# self.confobj.index(foo), which is rather fragile with
# this UserList...
print(" ->ZAIR", newobj)
_idx = self.linenum + 1

if True:
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.8"
version = "0.1.9"
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 feaaa64

Please sign in to comment.