Skip to content

Commit

Permalink
Remove editor.EditorError since editor defaults to output redirection…
Browse files Browse the repository at this point in the history
… when binary not found.
  • Loading branch information
nzlosh committed Mar 14, 2024
1 parent 5116589 commit 9913406
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions st2client/st2client/commands/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,9 @@ def run(self, args, **kwargs):
message, {"default": "y", "description": description}
)
if preview_dialog.read() == "y":
try:
contents = yaml.safe_dump(config, indent=4, default_flow_style=False)
modified = editor.editor(text=contents)
config = yaml.safe_load(modified)
except editor.EditorError as e:
print(six.text_type(e))
contents = yaml.safe_dump(config, indent=4, default_flow_style=False)
modified = editor.editor(text=contents)
config = yaml.safe_load(modified)

message = "---\nDo you want me to save it?"
save_dialog = interactive.Question(message, {"default": "y"})
Expand Down

0 comments on commit 9913406

Please sign in to comment.