Skip to content

Commit

Permalink
CLI: file not found error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
alopezrivera committed Jul 24, 2021
1 parent 21f54db commit 1ab53d3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion anchorage/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,14 @@ def main():
}]

browser = prompt(brow_choice, style=style)['browser']
bmk_dict = load(path(browser))
try:
bmk_dict = load(path(browser))
except FileNotFoundError:
smart_print_color("\n ~Error: file not found.", "red")
smart_print_color("\n ~Edit ~/anchorage/config.toml to include the correct bookmark file path "
"for your browser and try again.", "red")
sys.exit()

newline()

# 3. Bookmark filter
Expand Down

0 comments on commit 1ab53d3

Please sign in to comment.