本文整理汇总了Python中Install_Log.reset方法的典型用法代码示例。如果您正苦于以下问题:Python Install_Log.reset方法的具体用法?Python Install_Log.reset怎么用?Python Install_Log.reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Install_Log
的用法示例。
在下文中一共展示了Install_Log.reset方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __safe_call__
# 需要导入模块: import Install_Log [as 别名]
# 或者: from Install_Log import reset [as 别名]
def __safe_call__ (self):
Install_Log.reset()
Install_Log.log (".---------------------------------------------.")
Install_Log.log ("| PLEASE, DO NOT EDIT OR REMOVE THIS LOG FILE |")
Install_Log.log ("| |")
Install_Log.log ("| It contains useful information that |")
Install_Log.log ("| cherokee-admin might need in the future. |")
Install_Log.log (".---------------------------------------------.")
Install_Log.log ("Retrieving package information...")
# Check whether there are CTK.cfg changes to be saved
changes = "01"[int(CTK.cfg.has_changed())]
CTK.cfg['tmp!market!install!cfg_previous_changes'] = changes
# Render a welcome message
box = CTK.Box()
box += CTK.RawHTML ('<h2>%s</h2>' %(_('Connecting to Cherokee Market')))
box += CTK.RawHTML ('<h1>%s</h1>' %(_('Retrieving package information…')))
box += CTK.RawHTML (js = CTK.DruidContent__JS_to_goto (box.id, URL_INSTALL_INIT_CHECK))
# Dialog buttons
buttons = CTK.DruidButtonsPanel()
buttons += CTK.DruidButton_Close(_('Cancel'))
box += buttons
return box.Render().toStr()
示例2: __safe_call__
# 需要导入模块: import Install_Log [as 别名]
# 或者: from Install_Log import reset [as 别名]
def __safe_call__(self):
# Ensure the current UID has enough priviledges
if not InstallUtil.current_UID_is_admin() and 0:
box = CTK.Box()
box += CTK.RawHTML("<h2>%s</h2>" % (_(NO_ROOT_H1)))
box += CTK.RawHTML("<p>%s</p>" % (_(NO_ROOT_P1)))
box += CTK.RawHTML("<p>%s</p>" % (_(NO_ROOT_P2)))
buttons = CTK.DruidButtonsPanel()
buttons += CTK.DruidButton_Close(_("Cancel"))
box += buttons
return box.Render().toStr()
# Check the rest of pre-requisites
index = Distro.Index()
app_id = CTK.cfg.get_val("tmp!market!install!app!application_id")
app = index.get_package(app_id, "software")
inst = index.get_package(app_id, "installation")
if "cherokee_min_ver" in inst:
version = inst["cherokee_min_ver"]
if version_cmp(VERSION, version) < 0:
box = CTK.Box()
box += CTK.RawHTML("<h2>%s</h2>" % (_(MIN_VER_H1)))
box += CTK.RawHTML("<p>%s</p>" % (_(MIN_VER_P1) % (locals())))
buttons = CTK.DruidButtonsPanel()
buttons += CTK.DruidButton_Close(_("Cancel"))
box += buttons
return box.Render().toStr()
# Init the log file
Install_Log.reset()
Install_Log.log(".---------------------------------------------.")
Install_Log.log("| PLEASE, DO NOT EDIT OR REMOVE THIS LOG FILE |")
Install_Log.log("| |")
Install_Log.log("| It contains useful information that |")
Install_Log.log("| cherokee-admin might need in the future. |")
Install_Log.log(".---------------------------------------------.")
Install_Log.log("Retrieving package information...")
# Check whether there are CTK.cfg changes to be saved
changes = "01"[int(CTK.cfg.has_changed())]
CTK.cfg["tmp!market!install!cfg_previous_changes"] = changes
# Render a welcome message
box = CTK.Box()
box += CTK.RawHTML(js=CTK.DruidContent__JS_to_goto(box.id, URL_INSTALL_DOWNLOAD))
return box.Render().toStr()