@@ -1245,7 +1245,6 @@ def check_requirements(self, show_warning=False):
1245
1245
missing = []
1246
1246
except ProcessException :
1247
1247
warning ("Unable to auto-install required Python modules." )
1248
- pass
1249
1248
1250
1249
except (IOError , ImportError , OSError ):
1251
1250
pass
@@ -1385,7 +1384,7 @@ def set_cfg(self, *args, **kwargs):
1385
1384
def list_cfg (self , * args , ** kwargs ):
1386
1385
return Cfg (self .path ).list (* args , ** kwargs )
1387
1386
1388
- # Cfg classed used for handling the config backend
1387
+ # Cfg classed used for handling the config backend
1389
1388
class Cfg (object ):
1390
1389
path = None
1391
1390
file = ".mbed"
@@ -1415,7 +1414,6 @@ def set(self, var, val):
1415
1414
f .write ('\n ' .join (lines ) + '\n ' )
1416
1415
except (IOError , OSError ):
1417
1416
warning ("Unable to write config file %s" % fl )
1418
- pass
1419
1417
1420
1418
# Gets config value
1421
1419
def get (self , var , default_val = None ):
@@ -1797,7 +1795,7 @@ def publish(all_refs=None, msg=None, top=True):
1797
1795
repo .publish (all_refs )
1798
1796
else :
1799
1797
if top :
1800
- action ("Nothing to publish to the remote repository (the source tree is unmodified)" )
1798
+ action ("Nothing to publish to the remote repository (the source tree is unmodified)" )
1801
1799
except ProcessException as e :
1802
1800
if e [0 ] != 1 :
1803
1801
raise e
@@ -1987,7 +1985,7 @@ def sync(recursive=True, keep_refs=False, top=True):
1987
1985
def list_ (detailed = False , prefix = '' , p_path = None , ignore = False ):
1988
1986
repo = Repo .fromrepo ()
1989
1987
1990
- print ( "%s (%s)" % (prefix + (relpath (p_path , repo .path ) if p_path else repo .name ), ((repo .url + ('#' + str (repo .rev )[:12 ] if repo .rev else '' ) if detailed else str (repo .rev )[:12 ]) or 'no revision' ) ))
1988
+ print "%s (%s)" % (prefix + (relpath (p_path , repo .path ) if p_path else repo .name ), ((repo .url + ('#' + str (repo .rev )[:12 ] if repo .rev else '' ) if detailed else str (repo .rev )[:12 ]) or 'no revision' ))
1991
1989
1992
1990
for i , lib in enumerate (sorted (repo .libs , key = lambda l : l .path )):
1993
1991
if prefix :
@@ -2157,7 +2155,6 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
2157
2155
if not build :
2158
2156
build = os .path .join (program .path , program .build_dir , 'tests' , target , tchain )
2159
2157
2160
-
2161
2158
if test_spec :
2162
2159
# Preserve path to given test spec
2163
2160
test_spec = os .path .relpath (os .path .join (orig_path , test_spec ), program .path )
@@ -2297,7 +2294,7 @@ def detect():
2297
2294
def config_ (var = None , value = None , global_cfg = False , unset = False , list_config = False ):
2298
2295
name = var
2299
2296
var = str (var ).upper ()
2300
-
2297
+
2301
2298
if list_config :
2302
2299
g = Global ()
2303
2300
g_vars = g .list_cfg ().items ()
@@ -2306,7 +2303,7 @@ def config_(var=None, value=None, global_cfg=False, unset=False, list_config=Fal
2306
2303
for v in g_vars :
2307
2304
log ("%s=%s\n " % (v [0 ], v [1 ]))
2308
2305
else :
2309
- log ("No global configuration is set\n " )
2306
+ log ("No global configuration is set\n " )
2310
2307
log ("\n " )
2311
2308
2312
2309
p = Program (os .getcwd ())
@@ -2389,7 +2386,7 @@ def main():
2389
2386
2390
2387
# Help messages adapt based on current dir
2391
2388
cwd_root = os .getcwd ()
2392
-
2389
+
2393
2390
if sys .version_info [0 ] != 2 or sys .version_info [1 ] < 7 :
2394
2391
error (
2395
2392
"mbed CLI is compatible with Python version >= 2.7 and < 3.0\n "
@@ -2434,4 +2431,4 @@ def main():
2434
2431
2435
2432
2436
2433
if __name__ == "__main__" :
2437
- main ()
2434
+ main ()
0 commit comments