You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 2, 2025. It is now read-only.
Copy file name to clipboardexpand all lines: ciscoconfparse/ccp_util.py
+11-2
Original file line number
Diff line number
Diff line change
@@ -3484,10 +3484,19 @@ def remove(self, arg):
3484
3484
@logger.catch(reraise=True)
3485
3485
defas_list(self):
3486
3486
"""Return a list of sorted components; an empty string is automatically rejected. This method is tricky to test due to the requirement for the `.sort_list` attribute on all elements; avoid using the ordered nature of `as_list` and use `as_set`."""
3487
+
yy_list=copy.deepcopy(self._list)
3488
+
foriiinself._list:
3489
+
ifisinstance(ii, str) andii=="":
3490
+
# Reject an empty string...
3491
+
continue
3492
+
ifgetattr(ii, "sort_list", None) isnotNone:
3493
+
# Require the .sort_list attribute...
3494
+
yy_list.append(ii)
3495
+
3496
+
self._list=yy_list
3487
3497
try:
3488
-
[getattr(x, "sort_list") forxinself._list]
3489
3498
# Disable linter qa checks on this embedded list syntax...
0 commit comments