diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-14 14:37:42 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-14 14:37:42 +0100 |
commit | cd2ab5002aa2359575088bbc3183a9a91cc50c31 (patch) | |
tree | 810f2b7be99b16aee13a80daf4ca71597b42ecd6 /engine/SCons/Util.py | |
parent | 7c651e273c4db37f4babd91aaecf26800c50dd79 (diff) |
New upstream version 3.0.1upstream/3.0.1
Diffstat (limited to 'engine/SCons/Util.py')
-rw-r--r-- | engine/SCons/Util.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/engine/SCons/Util.py b/engine/SCons/Util.py index 2a1604b..c9aa2b5 100644 --- a/engine/SCons/Util.py +++ b/engine/SCons/Util.py @@ -24,7 +24,7 @@ Various utility functions go here. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Util.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog" +__revision__ = "src/engine/SCons/Util.py 74b2c53bc42290e911b334a6b44f187da698a668 2017/11/14 13:16:53 bdbaddog" import os import sys @@ -481,10 +481,7 @@ def to_String_for_subst(s, if isinstance(s, BaseStringTypes): return s elif isinstance(s, SequenceTypes): - l = [] - for e in s: - l.append(to_String_for_subst(e)) - return ' '.join( s ) + return ' '.join([to_String_for_subst(e) for e in s]) elif isinstance(s, UserString): # s.data can only be either a unicode or a regular # string. Please see the UserString initializer. @@ -1622,6 +1619,17 @@ def to_str (s): return s return str (s, 'utf-8') + + +# No cmp in py3, so we'll define it. +def cmp(a, b): + """ + Define cmp because it's no longer available in python3 + Works under python 2 as well + """ + return (a > b) - (a < b) + + # Local Variables: # tab-width:4 # indent-tabs-mode:nil |