Fix ValueError when not requesting a checkout

This commit is contained in:
Sybren A. Stüvel 2019-03-06 12:10:55 +01:00
parent dabb249e9b
commit 10abeaea49
2 changed files with 6 additions and 2 deletions

View File

@ -75,7 +75,10 @@ class ShamanPacker(bat_pack.Packer):
@property
def checkout_location(self) -> str:
"""Return the checkout location of the packed blend file."""
"""Return the checkout location of the packed blend file.
:return: the checkout location, or '' if no checkout was made.
"""
return self._checkout_location
@property

View File

@ -348,6 +348,7 @@ class ShamanTransferrer(bat_transfer.FileTransferer):
@property
def checkout_location(self) -> str:
"""Returns the checkout location, or '' if no checkout was made."""
if not self._checkout_location:
raise ValueError('No checkout was created yet.')
return ''
return self._checkout_location