def finalize_options(self):
"""
Look for unacceptable inputs, and where they exist, default
to reasonable standard values. Assume that no configuration
exists prior to your running this command.
"""
assert (isinstance(self.instance, str) and
len(self.instance) > 0 and
len(self.instance) < 32), 'Invalid instance name'
assert getpwnam(self.username), 'User name not found'
assert getgrnam(self.groupname), 'Group name not found'
assert isinstance(self.hostname, str), 'Invalid hostname'
assert (int(self.port) < 65536) and (int(self.port) > 1024), 'Invalid or privileged port given'
assert isinstance(self.data_root, str), 'Invalid data_root directory'
assert isinstance(self.config_root, str), 'Invalid config directory'
assert isinstance(self.cgi_bin, str), 'Invalid cgi-bin directory'
install.finalize_options(self)
评论列表
文章目录