Make toot instance work with localhost
Asserting the domain exists does not bring much value.
This commit is contained in:
parent
d308475afe
commit
ebc17e0764
1 changed files with 2 additions and 4 deletions
|
@ -4,7 +4,7 @@ import sys
|
|||
|
||||
from toot import api, config
|
||||
from toot.auth import login_interactive, login_browser_interactive, create_app_interactive
|
||||
from toot.exceptions import ConsoleError, NotFoundError
|
||||
from toot.exceptions import ApiError, ConsoleError, NotFoundError
|
||||
from toot.output import (print_out, print_instance, print_account, print_acct_list,
|
||||
print_search_results, print_timeline, print_notifications)
|
||||
from toot.utils import assert_domain_exists, editor_input, multiline_input, EOF_KEY
|
||||
|
@ -331,12 +331,10 @@ def instance(app, user, args):
|
|||
if not name:
|
||||
raise ConsoleError("Please specify instance name.")
|
||||
|
||||
assert_domain_exists(name)
|
||||
|
||||
try:
|
||||
instance = api.get_instance(name, args.scheme)
|
||||
print_instance(instance)
|
||||
except NotFoundError:
|
||||
except ApiError:
|
||||
raise ConsoleError(
|
||||
"Instance not found at {}.\n"
|
||||
"The given domain probably does not host a Mastodon instance.".format(name)
|
||||
|
|
Loading…
Reference in a new issue