本文整理汇总了Python中ubiquity.filteredcommand.FilteredCommand.ok_handler方法的典型用法代码示例。如果您正苦于以下问题:Python FilteredCommand.ok_handler方法的具体用法?Python FilteredCommand.ok_handler怎么用?Python FilteredCommand.ok_handler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ubiquity.filteredcommand.FilteredCommand
的用法示例。
在下文中一共展示了FilteredCommand.ok_handler方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ok_handler
# 需要导入模块: from ubiquity.filteredcommand import FilteredCommand [as 别名]
# 或者: from ubiquity.filteredcommand.FilteredCommand import ok_handler [as 别名]
def ok_handler(self):
# mythtv passwords
passwords = self.frontend.get_mythtv_passwords()
for this_password in passwords:
self.preseed("mythtv/" + this_password, passwords[this_password])
FilteredCommand.ok_handler(self)
示例2: ok_handler
# 需要导入模块: from ubiquity.filteredcommand import FilteredCommand [as 别名]
# 或者: from ubiquity.filteredcommand.FilteredCommand import ok_handler [as 别名]
def ok_handler(self):
if self.frontend.get_secure_mysql():
mysql_root = self.frontend.get_mysql_root_password()
else:
mysql_root = ""
self.preseed('mythtv/mysql_admin_password',mysql_root)
if not self.frontend.get_uselivemysqlinfo():
mysqluser = self.frontend.get_mysqluser()
else:
mysqluser = self.db.get('mythtv/mysql_mythtv_user')
self.preseed('mythtv/mysql_mythtv_user', mysqluser)
if not self.frontend.get_uselivemysqlinfo():
mysqlpass = self.frontend.get_mysqlpass()
else:
mysqlpass = self.db.get('mythtv/mysql_mythtv_password')
self.preseed('mythtv/mysql_mythtv_password', mysqlpass)
if not self.frontend.get_uselivemysqlinfo():
mysqldatabase = self.frontend.get_mysqldatabase()
else:
mysqldatabase = self.db.get('mythtv/mysql_mythtv_dbname')
self.preseed('mythtv/mysql_mythtv_dbname', mysqldatabase)
if not self.frontend.get_uselivemysqlinfo():
mysqlserver = self.frontend.get_mysqlserver()
else:
mysqlserver = self.db.get('mythtv/mysql_host')
self.preseed('mythtv/mysql_host', mysqlserver)
auth = self.frontend.get_secure_mythweb()
self.preseed_bool('mythweb/enable', auth)
user = self.frontend.get_mythweb_username()
self.preseed('mythweb/username', user)
passw = self.frontend.get_mythweb_password()
self.preseed('mythweb/password', passw)
FilteredCommand.ok_handler(self)
示例3: ok_handler
# 需要导入模块: from ubiquity.filteredcommand import FilteredCommand [as 别名]
# 或者: from ubiquity.filteredcommand.FilteredCommand import ok_handler [as 别名]
def ok_handler(self):
fullname = self.frontend.get_fullname()
username = self.frontend.get_username()
password = self.frontend.get_password()
password_confirm = self.frontend.get_verified_password()
auto_login = self.frontend.get_auto_login()
encrypt_home = self.frontend.get_encrypt_home()
self.preseed('passwd/user-fullname', fullname)
self.preseed('passwd/username', username)
# TODO: maybe encrypt these first
self.preseed('passwd/user-password', password)
self.preseed('passwd/user-password-again', password_confirm)
if self.frontend.oem_config:
self.preseed('passwd/user-uid', '29999')
else:
self.preseed('passwd/user-uid', '')
self.preseed_bool('passwd/auto-login', auto_login)
self.preseed_bool('user-setup/encrypt-home', encrypt_home)
hostname = self.frontend.get_hostname()
if hostname is not None and hostname != '':
hd = hostname.split('.', 1)
self.preseed('netcfg/get_hostname', hd[0])
if len(hd) > 1:
self.preseed('netcfg/get_domain', hd[1])
else:
self.preseed('netcfg/get_domain', '')
FilteredCommand.ok_handler(self)
示例4: ok_handler
# 需要导入模块: from ubiquity.filteredcommand import FilteredCommand [as 别名]
# 或者: from ubiquity.filteredcommand.FilteredCommand import ok_handler [as 别名]
def ok_handler(self):
zone = self.frontend.get_timezone()
if zone is None:
zone = self.db.get('time/zone')
else:
self.preseed('time/zone', zone)
for location in self.tzdb.locations:
if location.zone == zone:
self.preseed('debian-installer/country', location.country)
break
FilteredCommand.ok_handler(self)
示例5: ok_handler
# 需要导入模块: from ubiquity.filteredcommand import FilteredCommand [as 别名]
# 或者: from ubiquity.filteredcommand.FilteredCommand import ok_handler [as 别名]
def ok_handler(self):
fullname = self.frontend.get_fullname()
username = self.frontend.get_username()
password = self.frontend.get_password()
password_confirm = self.frontend.get_verified_password()
self.preseed('passwd/user-fullname', fullname)
self.preseed('passwd/username', username)
# TODO: maybe encrypt these first
self.preseed('passwd/user-password', password)
self.preseed('passwd/user-password-again', password_confirm)
if self.frontend.oem_config:
self.preseed('passwd/user-uid', '29999')
else:
self.preseed('passwd/user-uid', '')
FilteredCommand.ok_handler(self)
示例6: ok_handler
# 需要导入模块: from ubiquity.filteredcommand import FilteredCommand [as 别名]
# 或者: from ubiquity.filteredcommand.FilteredCommand import ok_handler [as 别名]
def ok_handler(self):
choices = self.frontend.ma_get_choices()
username = self.db.get('passwd/username')
users = {}
for c in choices:
if c['selected']:
question = 'migration-assistant/%s/%s/' % \
(c['part'],c['user'].replace(' ','+'))
self.db.register('migration-assistant/items', question + 'items')
self.preseed(question + 'items', ', '.join(c['items']))
self.db.register('migration-assistant/user', question + 'user')
self.preseed(question + 'user', username)
try:
users[c['part']].append(c['user'])
except KeyError:
users[c['part']] = [c['user']]
for p in users.iterkeys():
question = 'migration-assistant/%s/users' % p
self.db.register('migration-assistant/users', question)
self.preseed(question, ', '.join(users[p]))
FilteredCommand.ok_handler(self)
示例7: ok_handler
# 需要导入模块: from ubiquity.filteredcommand import FilteredCommand [as 别名]
# 或者: from ubiquity.filteredcommand.FilteredCommand import ok_handler [as 别名]
def ok_handler(self):
syslog.syslog("------->ok handler guadaPrePartition")
return FilteredCommand.ok_handler(self)
示例8: ok_handler
# 需要导入模块: from ubiquity.filteredcommand import FilteredCommand [as 别名]
# 或者: from ubiquity.filteredcommand.FilteredCommand import ok_handler [as 别名]
def ok_handler(self):
if self.language_question is not None:
self.preseed(self.language_question, self.frontend.get_language())
FilteredCommand.ok_handler(self)
示例9: ok_handler
# 需要导入模块: from ubiquity.filteredcommand import FilteredCommand [as 别名]
# 或者: from ubiquity.filteredcommand.FilteredCommand import ok_handler [as 别名]
def ok_handler(self):
variant = self.frontend.get_keyboard_variant()
if variant is not None:
self.preseed("console-setup/variant", variant)
return FilteredCommand.ok_handler(self)