diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-04-26 18:49:06 (GMT) |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-04-26 18:49:06 (GMT) |
commit | 28b036c0f803c2a156de7e155daa0f8635e95d89 (patch) | |
tree | f4c4ceb24a3fe3001dc394e833731ebdfbcca208 /QMTest/TestCommon.py | |
parent | 186b632fd20283e821b6a65c72772635017945fb (diff) | |
download | SCons-28b036c0f803c2a156de7e155daa0f8635e95d89.zip SCons-28b036c0f803c2a156de7e155daa0f8635e95d89.tar.gz SCons-28b036c0f803c2a156de7e155daa0f8635e95d89.tar.bz2 |
http://scons.tigris.org/issues/show_bug.cgi?id=2345
Apply all the remaining changes from the fixers.
Diffstat (limited to 'QMTest/TestCommon.py')
-rw-r--r-- | QMTest/TestCommon.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/QMTest/TestCommon.py b/QMTest/TestCommon.py index fce0fc8..fcd3e70 100644 --- a/QMTest/TestCommon.py +++ b/QMTest/TestCommon.py @@ -95,10 +95,13 @@ __version__ = "0.37" import copy import os -import os.path import stat import sys -import UserList +try: + from collections import UserList +except ImportError: + # no 'collections' module or no UserList in collections + exec('from UserList import UserList') from TestCmd import * from TestCmd import __all__ @@ -171,8 +174,7 @@ else: dll_suffix = '.so' def is_List(e): - return isinstance(e, list) \ - or isinstance(e, UserList.UserList) + return isinstance(e, (list,UserList)) def is_writable(f): mode = os.stat(f)[stat.ST_MODE] |