1
0
Fork 0

fixed bug when diff has no dependencies

This commit is contained in:
Christian Kühnel 2020-01-20 13:29:58 +01:00
parent 7228ab9fdc
commit 1fc40ffedd

View file

@ -105,9 +105,13 @@ class ApplyPatch:
def _get_revisions(self, *, phids: str = None):
"""Get a list of revisions from Phabricator based on their PH-IDs."""
if phids is not None:
return self.phab.differential.query(phids=phids)
if phids is None:
raise InputError('no arguments given')
if phids == []:
# Handle an empty query locally. Otherwise the connection
# will time out.
return []
return self.phab.differential.query(phids=phids)
def _get_dependencies(self) -> List[int]: