Skip to content

Commit

Permalink
fix(cli): remove "Error:" in the arg when calling error() in config.py
Browse files Browse the repository at this point in the history
PR Closed: #658
  • Loading branch information
QianBao8902 committed Jun 3, 2021
1 parent 037014e commit 5afeec1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tensorbay/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _implement_config(obj: Dict[str, str], arg1: str, arg2: str) -> None:
if arg1.startswith(("Accesskey-", "ACCESSKEY-")):
profile_name = obj["profile_name"]
if profile_name == "config":
error("Error: name 'config' is preserved for gas basic config")
error("Name 'config' is preserved for gas basic config")

if profile_name not in config_parser:
config_parser.add_section(profile_name)
Expand All @@ -40,13 +40,13 @@ def _implement_config(obj: Dict[str, str], arg1: str, arg2: str) -> None:
config_parser.remove_option(profile_name, "url")
elif arg1 == "editor":
if not arg2:
error("Error: Missing editor name")
error("Missing editor name")

if "config" not in config_parser:
config_parser.add_section("config")
config_parser["config"]["editor"] = arg2
else:
error("Error: Wrong accesskey format")
error("Wrong accesskey format")

with open(config_file, "w") as fp:
config_parser.write(fp)
Expand Down

0 comments on commit 5afeec1

Please sign in to comment.