diff options
author | Satoru SATOH <satoru.satoh@gmail.com> | 2009-07-16 01:06:15 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-07-15 14:26:08 -0300 |
commit | 7877f721f18642e6a7a80d087e582b0a755c0f35 (patch) | |
tree | e3d9fbbb9570463a4aeb7208b4da20f5532244e7 | |
parent | d59152a489dbb9254f716c2cf2b3ad372b2d6b1d (diff) | |
download | tuna-7877f721f18642e6a7a80d087e582b0a755c0f35.tar.gz |
Suppress the DeprecationWarning of sets module
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-x | tuna-cmd.py | 6 | ||||
-rwxr-xr-x | tuna/tuna.py | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/tuna-cmd.py b/tuna-cmd.py index 8a425dc..29967f8 100755 --- a/tuna-cmd.py +++ b/tuna-cmd.py @@ -27,10 +27,10 @@ except: have_inet_diag = False try: + set +except NameError: + # In python < 2.4, "set" is not the first class citizen. from sets import Set as set -except: - # OK, we're modern, having sets as first class citizens - pass # FIXME: ETOOMANYGLOBALS, we need a class! diff --git a/tuna/tuna.py b/tuna/tuna.py index 0e59238..e5768d3 100755 --- a/tuna/tuna.py +++ b/tuna/tuna.py @@ -4,10 +4,9 @@ import copy, ethtool, os, procfs, schedutils try: + set +except NameError: from sets import Set as set -except: - # OK, we're modern, having sets as first class citizens - pass kthread_help_str = {} |