Fix system resume event in inquirer prompt
This commit is contained in:
parent
da4a388697
commit
d55fc63a41
|
@ -427,7 +427,11 @@ class Paths:
|
||||||
default=self.paths_list,
|
default=self.paths_list,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
return inquirer.prompt(questions, theme=self.theme)['selection']
|
prompt = inquirer.prompt(questions, theme=self.theme)
|
||||||
|
if prompt:
|
||||||
|
return prompt['selection']
|
||||||
|
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
def get_paths_list(self, path):
|
def get_paths_list(self, path):
|
||||||
self.paths_list = list(self.get_files(path))
|
self.paths_list = list(self.get_files(path))
|
||||||
|
|
|
@ -301,9 +301,11 @@ class Media(ReadExif):
|
||||||
default=default,
|
default=default,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
# import ipdb; ipdb.set_trace()
|
|
||||||
answers = inquirer.prompt(choices_list, theme=self.theme)
|
answers = inquirer.prompt(choices_list, theme=self.theme)
|
||||||
|
|
||||||
|
if not answers:
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
if not answers['date_list']:
|
if not answers['date_list']:
|
||||||
prompt = [
|
prompt = [
|
||||||
inquirer.Text('date_custom', message="date"),
|
inquirer.Text('date_custom', message="date"),
|
||||||
|
@ -414,6 +416,9 @@ class Media(ReadExif):
|
||||||
]
|
]
|
||||||
|
|
||||||
answers = inquirer.prompt(choices_list, theme=self.theme)
|
answers = inquirer.prompt(choices_list, theme=self.theme)
|
||||||
|
if not answers:
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
if not answers['album']:
|
if not answers['album']:
|
||||||
answers = inquirer.prompt(prompt, theme=self.theme)
|
answers = inquirer.prompt(prompt, theme=self.theme)
|
||||||
return answers['custom']
|
return answers['custom']
|
||||||
|
|
Loading…
Reference in New Issue