Revision 1dd30e62
b/devflow/utils.py | ||
---|---|---|
230 | 230 |
|
231 | 231 |
|
232 | 232 |
def get_distribution_codename(): |
233 |
codename = sh.uname().lower() |
|
233 |
codename = sh.uname().lower().strip()
|
|
234 | 234 |
if codename == "linux": |
235 | 235 |
# lets try to be more specific using lsb_release |
236 | 236 |
try: |
237 | 237 |
output = sh.lsb_release("-c") # pylint: disable=E1101 |
238 | 238 |
_, codename = output.split("\t") |
239 |
except sh.CommandNotFound: |
|
239 |
except sh.CommandNotFound as e:
|
|
240 | 240 |
pass |
241 | 241 |
codename = codename.strip() |
242 | 242 |
return codename |
Also available in: Unified diff