def _create_area(self): try: self._product_area = PTaskArea.create(self.product_repr) except PTaskAreaError as e: raise ActionError( "Unable to create product area on disk: " + str(e))
def _create_ptask_area(self): # ---- create the directory path if it doesn't exist try: self._ptask_area = PTaskArea(self.ptask.spec) except PTaskAreaError: pass else: if not self.force: raise ActionError("PTask area already exists.") if not self.ptask_area: try: self._ptask_area = PTaskArea.create(self.ptask) except PTaskAreaError as e: raise ActionError("Failed to create ptask area: " + str(e))