Replace spaces with -'s

On Centos, the lsb_release returns the text on one line. To solve that,
we need to replace not just newlines, but also spaces in the output
to match what lsb_release -i -r -s | xargs | tr ' ' '-' will do.

Change-Id: I5e4ecdb918d1f9e3c225974f89d7ceb4f1abc4f1
This commit is contained in:
Monty Taylor 2013-11-16 04:17:19 -05:00
parent 7183290008
commit 46aca65aee
1 changed files with 1 additions and 1 deletions

View File

@ -316,7 +316,7 @@ class Mirror(object):
def _get_distro(self):
out = self.run_command('lsb_release -i -r -s')
return out.strip().replace('\n', '-')
return out.strip().replace('\n', '-').replace(' ', '-')
def process_cache(self, mirror):
if self.args.noop: