Skip to content

Commit 11d6071

Browse files
committed
Cosmetic fix to error and warning reporting. Also don't report user abort (Ctrl+C) as error
1 parent 394370a commit 11d6071

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ Here is a list of currently implemented configuration settings:
713713
* `target` - Define default target for `compile`, `test` and `export`, and is an alias to `mbed target`. Default: none.
714714
* `toolchain` - Defines default toolchain for `compile` and `test` can be set through `mbed toolchain`. Default: none.
715715
* `ARM_PATH`, `GCC_ARM_PATH`, `IAR_PATH` - defines default path to ARM Compiler, GCC ARM and IAR Workbench toolchains. Default: none.
716-
* `protocol` - Defines the default protocol used for importing/cloning of programs and libraries. Possible values are `https`, `http` and `ssh`. Default: `https`.
716+
* `protocol` - Defines the default protocol used for importing/cloning of programs and libraries. Possible values are `https`, `http` and `ssh`. Use `ssh` if you have generated and registered SSH keys (Public Key Authentication) with a service like GitHub, GitLab, Bitbucket, etc. Read more about SSH keys [here](https://help.github.com/articles/generating-an-ssh-key/) Default: `https`.
717717
* `depth` - Defines *clone* depth for importing/cloning and applies only to *Git* repositories. Note that while this option may improve cloning speed, it may also prevent you from correctly checking out a dependency tree when the reference revision hash older than the clone depth. Google `shallow clone` if you'd like to know more about using shallow clones. Default: none.
718718
* `cache` (EXPERIMENTAL) - Defines local path that will be used to store minimalistic copies of the imported/cloned repositories and attempt to use them to minimize traffic and speed up future importing. Note that this is an experimental feature and should be used for stable and production-ready repositories only. Default: none (disabled).
719719

mbed/mbed.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ def action(msg):
132132

133133
def warning(msg):
134134
for line in msg.splitlines():
135-
sys.stderr.write("[mbed WARNING] %s\n" % line)
135+
sys.stderr.write("[mbed] WARNING: %s\n" % line)
136136
sys.stderr.write("---\n")
137137

138138
def error(msg, code=-1):
139139
for line in msg.splitlines():
140-
sys.stderr.write("[mbed ERROR] %s\n" % line)
140+
sys.stderr.write("[mbed] ERROR: %s\n" % line)
141141
sys.stderr.write("---\n")
142142
sys.exit(code)
143143

@@ -2225,7 +2225,8 @@ def help_():
22252225
else:
22262226
error('OS Error: %s' % e[1], e[0])
22272227
except KeyboardInterrupt as e:
2228-
error('User aborted!', 255)
2228+
log('User aborted!', -1)
2229+
sys.exit(255)
22292230
except Exception as e:
22302231
if very_verbose:
22312232
traceback.print_exc(file=sys.stdout)

0 commit comments

Comments
 (0)