public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/config/
Date: Tue, 18 Jun 2013 14:12:55 +0000 (UTC)	[thread overview]
Message-ID: <1371140880.c5c9eb0fe096b62e305f4e4ed0b6768a637dd9f3.dywi@gentoo> (raw)
Message-ID: <20130618141255.Wm0tkpVlTZCPh_Y9fanbKyTyEMme9BwG1mhN6Pu2D-g@z> (raw)

commit:     c5c9eb0fe096b62e305f4e4ed0b6768a637dd9f3
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Thu Jun 13 16:28:00 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Thu Jun 13 16:28:00 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=c5c9eb0f

roverlay/config/loader: support real types

---
 roverlay/config/loader.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/roverlay/config/loader.py b/roverlay/config/loader.py
index c96598b..182915a 100644
--- a/roverlay/config/loader.py
+++ b/roverlay/config/loader.py
@@ -433,8 +433,15 @@ class ConfigLoader ( object ):
          vtypes = value_type
       elif isinstance ( value_type, str ):
          vtypes = value_type.split ( ':' )
+      elif type ( value_type ) is type:
+         try:
+            return value_type ( value )
+         except ValueError:
+            return None
       else:
-         self.logger.error ( "Unknown data type for value type." )
+         self.logger.error (
+            "Unknown value type {!r}.".format ( value_type )
+         )
          return value
 
       # value_type -> function where function accepts one parameter


             reply	other threads:[~2013-06-18 14:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-13 16:34 André Erdmann [this message]
2013-06-18 14:12 ` [gentoo-commits] proj/R_overlay:master commit in: roverlay/config/ André Erdmann
  -- strict thread matches above, loose matches on Subject: below --
2013-06-19 18:59 André Erdmann
2013-06-19 18:58 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-06-30 15:58 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-26 17:29 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-08 22:47 André Erdmann
2013-07-10 15:10 André Erdmann
2013-07-11 16:29 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-11 16:44 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-12 13:57 André Erdmann
2013-07-12 13:57 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-12 13:57 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-16 16:36 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-15 22:31 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann

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=1371140880.c5c9eb0fe096b62e305f4e4ed0b6768a637dd9f3.dywi@gentoo \
    --to=dywi@mailerd.de \
    --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