Skip to content

Commit

Permalink
Added debug code to catch issues in copy()
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
  • Loading branch information
andy-maier committed Jul 28, 2020
1 parent ffc607e commit a990892
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nocaselist/_nocaselist.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,10 @@ def copy(self):
# We first try to copy (normally cheaper than lower-casing)
new = super(NocaseList, self).copy()
# pylint: disable=protected-access
new._lc_list = self_lc_list.copy()
try:
new._lc_list = self_lc_list.copy()
except AttributeError:
raise AttributeError("Debug: dir(self)={!r}".format(dir(self)))
return new
except AttributeError:
return NocaseList(self)
Expand Down

0 comments on commit a990892

Please sign in to comment.