本文整理汇总了Python中preupg.utils.FileHelper.get_list_executable_files_in_dir方法的典型用法代码示例。如果您正苦于以下问题:Python FileHelper.get_list_executable_files_in_dir方法的具体用法?Python FileHelper.get_list_executable_files_in_dir怎么用?Python FileHelper.get_list_executable_files_in_dir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类preupg.utils.FileHelper
的用法示例。
在下文中一共展示了FileHelper.get_list_executable_files_in_dir方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: check_postmigrate_dir
# 需要导入模块: from preupg.utils import FileHelper [as 别名]
# 或者: from preupg.utils.FileHelper import get_list_executable_files_in_dir [as 别名]
def check_postmigrate_dir(self):
if not FileHelper.get_list_executable_files_in_dir(os.path.join(settings.assessment_results_dir,
settings.postmigrate_dir)):
if not self.conf.assumeyes:
accept = ['y', 'yes']
log_message("The '%s' folder is empty - scripts to be executed "
"after the migration should be placed "
"here." % os.path.join(settings.result_dir,
settings.postmigrate_dir))
message = "Do you want to continue with kickstart " \
"generation without any postmigration scripts?"
choice = MessageHelper.get_message(message=message, prompt="(Y/n)")
if choice.lower() not in accept:
return None
return True