From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoopm:master commit in: gentoopm/bash/
Date: Sun, 10 Jul 2011 21:37:49 +0000 (UTC) [thread overview]
Message-ID: <4916d04d6e81893172e48dff28fac72c70dc6fdd.mgorny@gentoo> (raw)
commit: 4916d04d6e81893172e48dff28fac72c70dc6fdd
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 10 21:29:49 2011 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jul 10 21:29:49 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoopm.git;a=commit;h=4916d04d
BashParser: support getting multiple variables.
---
gentoopm/bash/__init__.py | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/gentoopm/bash/__init__.py b/gentoopm/bash/__init__.py
index ff7e31c..53b9b88 100644
--- a/gentoopm/bash/__init__.py
+++ b/gentoopm/bash/__init__.py
@@ -33,3 +33,19 @@ class BashParser(ABCObject):
@rtype: string
"""
pass
+
+ def get_env(self, *varlist):
+ """
+ Get values of multiple environment variables, and return them
+ as a dict.
+
+ @param varlist: environment variable names
+ @type varlist: list(string)
+ @return: environment variables with values
+ @rtype: dict(string -> string)
+ """
+
+ out = {}
+ for v in varlist:
+ out[v] = self[v]
+ return out
next reply other threads:[~2011-07-10 21:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-10 21:37 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-08-05 8:50 [gentoo-commits] proj/gentoopm:master commit in: gentoopm/bash/ Michał Górny
2013-08-04 12:52 Michał Górny
2011-07-17 21:21 Michał Górny
2011-07-15 16:08 Michał Górny
2011-07-15 16:08 Michał Górny
2011-07-15 16:08 Michał Górny
2011-07-15 13:32 Michał Górny
2011-07-15 12:34 Michał Górny
2011-07-10 21:37 Michał Górny
2011-07-10 21:37 Michał Górny
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=4916d04d6e81893172e48dff28fac72c70dc6fdd.mgorny@gentoo \
--to=mgorny@gentoo.org \
--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