[rtems-tools commit] rtemstoolkit: Support more Linux distributions
Sebastian Huber
sebh at rtems.org
Thu Mar 5 09:58:18 UTC 2020
Module: rtems-tools
Branch: master
Commit: 00b9f1d825b91700a06a1979efd34a5313c73e44
Changeset: http://git.rtems.org/rtems-tools/commit/?id=00b9f1d825b91700a06a1979efd34a5313c73e44
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Mar 5 10:25:38 2020 +0100
rtemstoolkit: Support more Linux distributions
The platform.dist() function is not always available.
---
rtemstoolkit/linux.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rtemstoolkit/linux.py b/rtemstoolkit/linux.py
index 7e45409..1b55655 100644
--- a/rtemstoolkit/linux.py
+++ b/rtemstoolkit/linux.py
@@ -83,8 +83,9 @@ def overrides():
try:
distro = platform.dist()[0]
distro_ver = float(platform.dist()[1])
- except ValueError:
+ except (AttributeError, ValueError):
# Non LSB distro found, use failover"
+ distro = ''
pass
# Non LSB - fail over to issue
More information about the vc
mailing list