public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/
Date: Tue, 22 Apr 2014 02:36:15 +0000 (UTC)	[thread overview]
Message-ID: <1396172624.0ac04f83762aa86f7020cd0b5176e66870f9c1ba.dol-sen@gentoo> (raw)

commit:     0ac04f83762aa86f7020cd0b5176e66870f9c1ba
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 30 09:43:44 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Mar 30 09:43:44 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0ac04f83

config_check fixes

---
 pym/portage/sync/config_checks.py | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/pym/portage/sync/config_checks.py b/pym/portage/sync/config_checks.py
index 66d69da..8ef1974 100644
--- a/pym/portage/sync/config_checks.py
+++ b/pym/portage/sync/config_checks.py
@@ -11,8 +11,11 @@ subclass it adding and/or overriding classes as needed.
 
 import logging
 
+from portage.localization import _
+from portage.util import writemsg_level
 
-def check_type(repo, logger):
+
+def check_type(repo, logger, module_names):
 	if repo.sync_uri is not None and repo.sync_type is None:
 		writemsg_level("!!! %s\n" %
 			_("Repository '%s' has sync-uri attribute, but is missing sync-type attribute")
@@ -30,24 +33,14 @@ def check_type(repo, logger):
 class CheckSyncConfig(object):
 	'''Base repos.conf settings checks class'''
 
-	def __init__(self, logger=None):
+	def __init__(self, repo=None, logger=None):
 		'''Class init function
 
 		@param logger: optional logging instance,
 			defaults to logging module
 		'''
 		self.logger = logger or logging
-
-
-	def __call__(self, repo, logger=None):
-		'''Class call method
-
-		@param repo: RepoConfig instance
-		@param logger: optional logging instance'''
-		if logger:
-			self.logger = logger
 		self.repo = repo
-		self.repo_checks()
 		self.checks = ['check_uri', 'check_auto_sync']
 
 
@@ -68,8 +61,8 @@ class CheckSyncConfig(object):
 		'''Check the auto_sync setting'''
 		if self.repo.auto_sync is None:
 			writemsg_level("!!! %s\n" % _("Repository '%s' is missing auto_sync attribute")
-				% repo.name, level=self.logger.ERROR, noiselevel=-1)
-		if self.repo.auto_sync.lower() not in ["yes", "true", "no", "false"]:
+				% self.repo.name, level=self.logger.ERROR, noiselevel=-1)
+		elif self.repo.auto_sync.lower() not in ["yes", "true", "no", "false"]:
 			writemsg_level("!!! %s\n" % _("Repository '%s' auto_sync attribute must be one of: %s")
-				% (self.repo.name, '{yes, true, no, false}',
+				% (self.repo.name, '{yes, true, no, false}'),
 				level=self.logger.ERROR, noiselevel=-1)


             reply	other threads:[~2014-04-22  2:36 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22  2:36 Brian Dolbec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-12-04 20:16 [gentoo-commits] proj/portage:master commit in: pym/portage/sync/ Brian Dolbec
2014-12-04 20:04 ` [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:16 [gentoo-commits] proj/portage:master " Brian Dolbec
2014-12-04 20:04 ` [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:16 [gentoo-commits] proj/portage:master " Brian Dolbec
2014-12-04 20:04 ` [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:04 Brian Dolbec
2014-12-04 20:04 Brian Dolbec
2014-12-04 20:04 Brian Dolbec
2014-12-04 20:04 Brian Dolbec
2014-12-04 20:04 Brian Dolbec
2014-12-01 21:50 Michał Górny
2014-12-01 21:50 Michał Górny
2014-12-01 21:50 Michał Górny
2014-12-01 21:50 Michał Górny
2014-12-01 21:50 Michał Górny
2014-12-01 21:50 Michał Górny
2014-10-21  5:05 Zac Medico
2014-10-21  5:05 Zac Medico
2014-10-21  5:05 Zac Medico
2014-10-21  5:05 Zac Medico
2014-10-21  5:05 Zac Medico
2014-10-21  5:05 Zac Medico
2014-10-20 20:46 Zac Medico
2014-10-20  3:54 Zac Medico
2014-10-20  3:54 Zac Medico
2014-10-20  3:54 Zac Medico
2014-10-20  3:54 Zac Medico
2014-10-20  3:54 Zac Medico
2014-09-30  0:46 Brian Dolbec
2014-09-30  0:46 Brian Dolbec
2014-09-30  0:46 Brian Dolbec
2014-09-30  0:46 Brian Dolbec
2014-09-30  0:46 Brian Dolbec
2014-09-29 18:29 Brian Dolbec
2014-09-29 18:29 Brian Dolbec
2014-09-29 18:29 Brian Dolbec
2014-09-29 18:29 Brian Dolbec
2014-09-29 18:29 Brian Dolbec
2014-09-27  5:05 Brian Dolbec
2014-09-27  2:20 Brian Dolbec
2014-09-27  2:20 Brian Dolbec
2014-09-27  2:20 Brian Dolbec
2014-09-27  2:20 Brian Dolbec
2014-09-05 21:15 Brian Dolbec
2014-09-05 21:15 Brian Dolbec
2014-09-05 21:15 Brian Dolbec
2014-09-05  4:38 Brian Dolbec
2014-09-05  4:38 Brian Dolbec
2014-09-05  4:38 Brian Dolbec
2014-09-04  1:18 Brian Dolbec
2014-09-04  1:18 Brian Dolbec
2014-09-03 23:36 Brian Dolbec
2014-09-03 23:36 Brian Dolbec
2014-08-19 20:19 Brian Dolbec
2014-06-17  0:42 Brian Dolbec
2014-06-16 15:46 Brian Dolbec
2014-06-16 15:18 Brian Dolbec
2014-05-11 17:22 Brian Dolbec
2014-05-02 23:13 Brian Dolbec
2014-04-22  2:36 Brian Dolbec
2014-04-22  2:36 Brian Dolbec
2014-04-22  2:36 Brian Dolbec
2014-04-22  2:36 Brian Dolbec
2014-04-22  2:36 Brian Dolbec
2014-03-14 16:23 Brian Dolbec
2014-03-14 16:23 Brian Dolbec
2014-02-19  8:29 Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396172624.0ac04f83762aa86f7020cd0b5176e66870f9c1ba.dol-sen@gentoo \
    --to=brian.dolbec@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox