Skip to content

Commit

Permalink
Fix the handling of nfs:// URLs.
Browse files Browse the repository at this point in the history
Using .strip strips the first letters of the hostname if they happen be
n, f or s.

(cherry picked from commit c420772)
  • Loading branch information
dashea committed Mar 12, 2015
1 parent 39da315 commit fe02b76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyanaconda/packaging/yumpayload.py
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion pyanaconda/ui/tui/spokes/source.py
Expand Up @@ -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)
Expand Down

0 comments on commit fe02b76

Please sign in to comment.