diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-08 13:17:15 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-08 13:17:15 +0100 |
commit | ed44d29b9004ee355860d0d469dfe191dfcef184 (patch) | |
tree | d70361b565a504e990d72e1c5c09f8c2fac82d4c | |
parent | 6c286ed9c50bf2e23a597bf46d7ae644236b6adc (diff) | |
download | poky-ed44d29b9004ee355860d0d469dfe191dfcef184.tar.gz |
bitbake/lib/bb/__init__.py: Sync with upstream bitbake
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/__init__.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py index 4c7afc9c21..25cd24e223 100644 --- a/bitbake/lib/bb/__init__.py +++ b/bitbake/lib/bb/__init__.py | |||
@@ -21,7 +21,7 @@ | |||
21 | # with this program; if not, write to the Free Software Foundation, Inc., | 21 | # with this program; if not, write to the Free Software Foundation, Inc., |
22 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 22 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
23 | 23 | ||
24 | __version__ = "1.11.0" | 24 | __version__ = "1.13.0" |
25 | 25 | ||
26 | import sys | 26 | import sys |
27 | if sys.version_info < (2, 6, 0): | 27 | if sys.version_info < (2, 6, 0): |
@@ -79,6 +79,10 @@ def plain(*args): | |||
79 | logger.plain(''.join(args)) | 79 | logger.plain(''.join(args)) |
80 | 80 | ||
81 | def debug(lvl, *args): | 81 | def debug(lvl, *args): |
82 | if isinstance(lvl, basestring): | ||
83 | logger.warn("Passed invalid debug level '%s' to bb.debug", lvl) | ||
84 | args = (lvl,) + args | ||
85 | lvl = 1 | ||
82 | logger.debug(lvl, ''.join(args)) | 86 | logger.debug(lvl, ''.join(args)) |
83 | 87 | ||
84 | def note(*args): | 88 | def note(*args): |
@@ -95,7 +99,7 @@ def fatal(*args): | |||
95 | sys.exit(1) | 99 | sys.exit(1) |
96 | 100 | ||
97 | 101 | ||
98 | def deprecated(func, name = None, advice = ""): | 102 | def deprecated(func, name=None, advice=""): |
99 | """This is a decorator which can be used to mark functions | 103 | """This is a decorator which can be used to mark functions |
100 | as deprecated. It will result in a warning being emmitted | 104 | as deprecated. It will result in a warning being emmitted |
101 | when the function is used.""" | 105 | when the function is used.""" |
@@ -109,8 +113,8 @@ def deprecated(func, name = None, advice = ""): | |||
109 | def newFunc(*args, **kwargs): | 113 | def newFunc(*args, **kwargs): |
110 | warnings.warn("Call to deprecated function %s%s." % (name, | 114 | warnings.warn("Call to deprecated function %s%s." % (name, |
111 | advice), | 115 | advice), |
112 | category = PendingDeprecationWarning, | 116 | category=DeprecationWarning, |
113 | stacklevel = 2) | 117 | stacklevel=2) |
114 | return func(*args, **kwargs) | 118 | return func(*args, **kwargs) |
115 | newFunc.__name__ = func.__name__ | 119 | newFunc.__name__ = func.__name__ |
116 | newFunc.__doc__ = func.__doc__ | 120 | newFunc.__doc__ = func.__doc__ |