summaryrefslogtreecommitdiffstats
path: root/rtemstoolkit
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2020-09-25 11:22:34 +1000
committerChris Johns <chrisj@rtems.org>2020-09-26 10:49:27 +1000
commit87262b429d633420402e735a770f6d6cfedecf9a (patch)
tree6c9ee3464198f2d307b127d41060657565d2d34b /rtemstoolkit
parentlinkers: Update due to API changes (diff)
downloadrtems-tools-87262b429d633420402e735a770f6d6cfedecf9a.tar.bz2
Move all python commands to use env python
- If you host does not provide a python command consult the User manual for ways you can run the python commands. - Full package paths are being used to avoid namespace pollution and crosstalk.
Diffstat (limited to 'rtemstoolkit')
-rwxr-xr-xrtemstoolkit/rtems.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/rtemstoolkit/rtems.py b/rtemstoolkit/rtems.py
index 30c8c16..c7dcd9c 100755
--- a/rtemstoolkit/rtems.py
+++ b/rtemstoolkit/rtems.py
@@ -71,10 +71,7 @@ def configuration_path(prog = None):
2. Ok to directly call os.path.
'''
if prog is None:
- if len(sys.argv) == 1:
- exec_name = sys.argv[0]
- else:
- exec_name = sys.argv[1]
+ exec_name = sys.argv[0]
else:
exec_name = prog
exec_name = os.path.abspath(exec_name)
@@ -157,8 +154,10 @@ class configuration:
for arch in profile['archs']:
bsps = 'bsps_%s' % (arch)
profile[bsps] = self.config.comma_list(profile['name'], bsps)
- self.profiles[profile['name']] = profile
+ self.profiles[profile['name']] = dict(profile)
+ profile = None
invalid_chars = re.compile(r'[^a-zA-Z0-9_-]')
+ archs = sorted(list(set(archs)))
for a in set(archs):
if len(invalid_chars.findall(a)) != 0:
raise error.general('invalid character(s) in arch name: %s' % (a))