Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.


fix(base): fix duplicate warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhxiao committed Jul 19, 2019
1 parent 1b52154 commit b97acd6
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions gnes/base/
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,6 @@ def __init__(self, *args, **kwargs):
self.verbose = 'verbose' in kwargs and kwargs['verbose']
self.logger = set_logger(self.__class__.__name__, self.verbose)
self._post_init_vars = set()
if not getattr(self, 'name', None):
_id = str(uuid.uuid4()).split('-')[0]
_name = '%s-%s' % (self.__class__.__name__, _id)
'this object is not named ("- gnes_config: - name" is not found in YAML config), '
'i will call it as "%s". '
'However, naming the object is important especially when you need to '
'serialize/deserialize/store/load the object.' % _name)
setattr(self, 'name', _name)

def _post_init_wrapper(self):
_before = set(list(self.__dict__.keys()))
Expand Down

0 comments on commit b97acd6

Please sign in to comment.