Avoid DeprecationWarning under Python 2.6. Part of the 6.3 release. trunk

Sun, 19 Oct 2008 22:47:59 -0400

author
Brett Smith <brettcsmith@brettcsmith.org>
date
Sun, 19 Oct 2008 22:47:59 -0400
branch
trunk
changeset 94
6cdbdffa2e2e
parent 93
6c20788653a8
child 95
4f7d3ccecf32

Avoid DeprecationWarning under Python 2.6. Part of the 6.3 release.

NEWS file | annotate | diff | comparison | revisions
scripts/dtrx file | annotate | diff | comparison | revisions
--- a/NEWS	Sun Oct 19 22:42:20 2008 -0400
+++ b/NEWS	Sun Oct 19 22:47:59 2008 -0400
@@ -15,6 +15,10 @@
  * Previous versions of dtrx would fail to extract certain archive types
    with the ``-v`` option specified.  This has been fixed.
 
+ * dtrx 6.3 no longer imports the sets module unless it's running under a
+   very old version of Python, to avoid deprecation warnings under Python
+   2.6.
+
 Version 6.2
 -----------
 
--- a/scripts/dtrx	Sun Oct 19 22:42:20 2008 -0400
+++ b/scripts/dtrx	Sun Oct 19 22:47:59 2008 -0400
@@ -35,7 +35,10 @@
 import textwrap
 import traceback
 
-from sets import Set as set
+try:
+    set
+except NameError:
+    from sets import Set as set
 
 VERSION = "6.3"
 VERSION_BANNER = """dtrx version %s

mercurial