diff --git a/scripts/phabtalk/apply_patch2.py b/scripts/phabtalk/apply_patch2.py index 7b3ad03..6277971 100755 --- a/scripts/phabtalk/apply_patch2.py +++ b/scripts/phabtalk/apply_patch2.py @@ -51,7 +51,7 @@ class ApplyPatch: self.diff_json_path = store_json_diff # type: str if not self.host.endswith('/api/'): self.host += '/api/' - self.phab = Phabricator(token=self.conduit_token, host=self.host) + self.phab = self._create_phab() self.git_hash = None # type: Optional[str] self.msg = [] # type: List[str] self.repo = Repo(os.getcwd()) # type: Repo @@ -90,6 +90,11 @@ class ApplyPatch: finally: self._write_error_message() + def _create_phab(): + phab = Phabricator(token=self.conduit_token, host=self.host) + self._phab.update_interfaces() + return phab + def _get_diff(self, diff_id: str): """Get a diff from Phabricator based on it's diff id.""" return self.phab.differential.getdiff(diff_id=diff_id)