Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

[이슈] LifeCycleMixin: 리스너 기본값 설정이 필요함 #9

Closed
binchoo opened this issue Jul 31, 2021 · 1 comment
Closed
Assignees
Labels
bug Something isn't working 해결: 수정 이슈를 인지하여 코드를 수정하였다
Milestone

Comments

@binchoo
Copy link
Owner

binchoo commented Jul 31, 2021

이슈 내용

리스너는 메서드로 주입되지만, 기본값이 설정되어 있지 않음.

def on_start(self, func):
self.on_start_listener = func
def on_end(self, func):
self.on_end_listener = func
def on_progress(self, func):
self.on_progress_listener = func
def on_error(self, func):
self.on_error_listener = func

기대 결과

  • 모두 None 초기값을 지닐 것을 권함.
  • 리스너 호출 로직은 None 검사를 추가로 진행해야 함.

참조

수정자 주입

@binchoo binchoo added the bug Something isn't working label Jul 31, 2021
@binchoo binchoo self-assigned this Jul 31, 2021
@binchoo binchoo added this to the QA 1.0.9 milestone Aug 5, 2021
@binchoo
Copy link
Owner Author

binchoo commented Aug 5, 2021

원인

수퍼 클래스를 2개 갖고 있을 때 명시적으로 생성자를 호출해 주어야 하는데, super().__init__을 사용하였기 때문

해결

LoginHooker 생성자에서 LifecycleMixin.__init__(self)Hooker.__init__(self, browser)를 호출하여 해결

@binchoo binchoo closed this as completed Aug 5, 2021
@binchoo binchoo added the 해결: 수정 이슈를 인지하여 코드를 수정하였다 label Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working 해결: 수정 이슈를 인지하여 코드를 수정하였다
Projects
None yet
Development

No branches or pull requests

1 participant