Skip to content

Commit

Permalink
fix del infor
Browse files Browse the repository at this point in the history
  • Loading branch information
QuanyiLi committed Oct 25, 2023
1 parent 4eb0db3 commit 1a3ab1e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions metadrive/base_class/nameable.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class Nameable:
"""
Instance of this class will have a special name
"""

def __init__(self, name=None):
# ID for object
self.name = random_string() if name is None else name
Expand All @@ -18,11 +19,9 @@ def class_name(self):

def __del__(self):
try:
str(self)
except AttributeError:
pass
else:
logging.debug("{} is destroyed".format(str(self)))
except:
pass

def __repr__(self):
return "{}".format(str(self))
Expand Down

0 comments on commit 1a3ab1e

Please sign in to comment.