From 59d739fca49bafdc0f1438846d06bbdb0eb3375c Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Wed, 12 Sep 2007 21:36:54 +0000 Subject: [PATCH] Add a function to convert a URL method string into a repo object (jkeating AT redhat DOT com). --- ChangeLog | 4 ++++ pykickstart/commands/repo.py | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index d4b92ae..20bea09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,10 @@ output. (Packages.__str__): Output %end after all the packages. + * pykickstart/commands/repo.py (F8_Repo.methodToRepo): Add a function + to convert a URL method string into a repo object (jkeating AT redhat + DOT com). + 2007-09-10 Chris Lumens * Makefile, MANIFEST.in, pykickstart.spec: Add the kickstart diff --git a/pykickstart/commands/repo.py b/pykickstart/commands/repo.py index a2d723a..2b84b98 100644 --- a/pykickstart/commands/repo.py +++ b/pykickstart/commands/repo.py @@ -142,3 +142,12 @@ class F8_Repo(FC6_Repo): rd = F8_RepoData() self._setToObj(op, opts, rd) self.add(rd) + + def methodToRepo(self): + if not self.handler.method.url: + raise KickstartError, formatErrorMsg(self.handler.method.lineno, msg=_("Method must be a url to be added to the repo lsit.")) + reponame = "ks-method-url" + repourl = self.handler.method.url + rd = F8_RepoData(name=reponame, baseurl=repourl) + self.add(rd) + -- 2.11.4.GIT