Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def location(self):
"""Return the location.
:return:
:rtype: str
"""
# no dir check needed if missing show dirs are created during post-processing
if sickbeard.CREATE_MISSING_SHOW_DIRS or self.is_location_valid():
return self._location
raise ShowDirectoryNotFoundException("Show folder doesn't exist, you shouldn't be using it")
def location(self, value):
logger.log(u'Setter sets location to ' + value, logger.DEBUG)
# Don't validate dir if user wants to add shows without creating a dir
if sickbeard.ADD_SHOWS_WO_DIR or self.is_location_valid(value):
self._location = value
else:
raise ShowDirectoryNotFoundException('Invalid folder for the show!')