From fe02b769a50368e19a83df83a57b5ad3b6ad79c7 Mon Sep 17 00:00:00 2001 From: David Shea Date: Mon, 2 Mar 2015 11:02:33 -0500 Subject: [PATCH] Fix the handling of nfs:// URLs. Using .strip strips the first letters of the hostname if they happen be n, f or s. (cherry picked from commit c420772742cfbc4d5e7f9aaf580b41f6ca746e86) --- pyanaconda/packaging/yumpayload.py | 2 +- pyanaconda/ui/tui/spokes/source.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 4f4517121a8..aa9019f2f04 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -656,7 +656,7 @@ def _configureAddOnRepo(self, repo): url = repo.baseurl if url and url.startswith("nfs://"): # Let the assignment throw ValueError for bad NFS urls from kickstart - (server, path) = url.strip("nfs://").split(":", 1) + (server, path) = url[6:].split(":", 1) mountpoint = "%s/%s.nfs" % (MOUNT_DIR, repo.name) self._setupNFS(mountpoint, server, path, None) diff --git a/pyanaconda/ui/tui/spokes/source.py b/pyanaconda/ui/tui/spokes/source.py index 67043dddab3..970a77d6c20 100644 --- a/pyanaconda/ui/tui/spokes/source.py +++ b/pyanaconda/ui/tui/spokes/source.py @@ -311,7 +311,7 @@ def apply(self): return False if self.args.server.startswith("nfs://"): - self.args.server = self.args.server.strip("nfs://") + self.args.server = self.args.server[6:] try: (self.data.method.server, self.data.method.dir) = self.args.server.split(":", 2)