Fix github connection for standalone debugging

Recent changes introduced a notification to the scheduler when
updating a change. However within standalone debugging of the
connection using the tools/github-debugging.py there is no
scheduler. Check that and notify the scheduler only if it's there.

Change-Id: I7d7ee6aac70a7d3fc5961e336dc1d12173c92d57
This commit is contained in:
Tobias Henkel 2018-02-05 10:03:59 +01:00
parent ce1bf1f34f
commit 3571e4eba6
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
1 changed files with 3 additions and 1 deletions

View File

@ -458,6 +458,7 @@ class GithubConnection(BaseConnection):
self._github = None
self.app_id = None
self.app_key = None
self.sched = None
self.installation_map = {}
self.installation_token_cache = {}
@ -827,7 +828,8 @@ class GithubConnection(BaseConnection):
change.updated_at = self._ghTimestampToDate(
change.pr.get('updated_at'))
self.sched.onChangeUpdated(change)
if self.sched:
self.sched.onChangeUpdated(change)
return change