def validate(self): if not self.getName(): raise ValueError(formatException('Name must not be empty', self)) if not self.getPath(): raise ValueError(formatException('Path must not be empty', self)) if not os.path.exists(self.getPath()): raise ValueError(formatException('Path does not exist "{path}"'.format(path = self.getPath()), self)) return True
def validate(self): if not self.getAsset(): raise ValueError(formatException('Asset must not be empty', self)) self.getAsset().validate() if not self.getFiletype(): raise ValueError(formatException('Filetype must not be empty', self)) if not self.getName(): raise ValueError(formatException('Name must not be empty', self)) if not self.getUser(): raise ValueError(formatException('User must not be empty', self)) self.getUser().validate() return True
def validate(self): if not self.getUsername(): raise ValueError(formatException('Username must not be empty', self)) return True