From 80e2eadc8c4b55313dbb50123f6abc99f2ce9e12 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@cd1c1023-2f26-0410-ae45-c471fc1f0318> Date: Wed, 19 Mar 2008 11:50:25 +0000 Subject: [PATCH] Spritz: - add local repository support to Spritz git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1493 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- spritz/src/spritz.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spritz/src/spritz.py b/spritz/src/spritz.py index 34ec07204..8bfcca6c3 100644 --- a/spritz/src/spritz.py +++ b/spritz/src/spritz.py @@ -238,7 +238,7 @@ class SpritzController(Controller): # call liststore and tell to add if text: # validate url - if not (text.startswith("http://") or text.startswith("ftp://")): + if not (text.startswith("http://") or text.startswith("ftp://") or text.startswith("file://")): okDialog( self.addrepo_ui.addRepoWin, _("You must enter either a HTTP or a FTP url.") ) else: self.repoMirrorsView.add(text) @@ -315,8 +315,8 @@ class SpritzController(Controller): repodata['description'] = "No description" if not repodata['packages']: errors.append(_("No download mirrors")) - if not repodata['database'] or not (repodata['database'].endswith("http://") or (not repodata['database'].endswith("ftp://"))): - errors.append(_("Database URL must be HTTP or FTP")) + if not repodata['database'] or not (repodata['database'].startswith("http://") or repodata['database'].startswith("ftp://") or repodata['database'].startswith("file://")): + errors.append(_("Database URL must start either with http:// or ftp:// or file://")) return errors def __getRepodata(self):