Skip to content

Commit

Permalink
hosts.Host: fix a regression bug
Browse files Browse the repository at this point in the history
A regression bug was introduced by 94fb7a8,which results Host's subclass
LocalHost can not be instantiated. Existing instantiation methods the same as
"localhost = LocalHost()" will no longer fail after changed.

Signed-off-by: Lei Yang <[email protected]>
  • Loading branch information
yanglei-rh committed Jul 4, 2023
1 parent 7c10487 commit 7630251
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion avocado/utils/network/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Host:
"""

def __init__(self, host):
if isinstance(self, Host):
if type(self) == Host:
raise TypeError("Host class should not be instantiated")
self.host = host

Expand Down

0 comments on commit 7630251

Please sign in to comment.