@branch.setter
def branch(self, value):
    if isinstance(value, str):
        self._branch = urlparse.quote(value)
    else:
        self._branch = value
@branch.setter
def branch(self, value):
    if isinstance(value, str):
        self._branch = urlparse.quote(value)
    else:
        self._branch = value