]> git.lyx.org Git - features.git/commitdiff
The sets module is deprecated since Python 2.6, so use the built-in
authorEnrico Forestieri <forenr@lyx.org>
Sat, 5 Feb 2011 22:59:01 +0000 (22:59 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Sat, 5 Feb 2011 22:59:01 +0000 (22:59 +0000)
type set, available as almost drop-in replacement since Python 2.4.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37505 a592a061-630c-0410-9148-cb99ea01b6c8

development/tools/lyxpak.py

index 983736373dc968a312677c6481dc1fb4ba2a59f0..bd0427307323a19aed51789bf68e95f478c23b7e 100755 (executable)
@@ -14,7 +14,8 @@
 # found in the path. The tar archive is then compressed with gzip or bzip2.
 
 import os, re, string, sys
-from sets import Set
+if sys.version_info < (2, 4, 0):
+    from sets import Set as set
 
 # Replace with the actual path to the 1.5.x or 1.6.x lyx2lyx.
 # If left undefined and the LyX executable is in the path, the script will
@@ -256,7 +257,7 @@ def main(argv):
         i += 1
 
     # Remove duplicates and sort the list
-    incfiles = list(Set(incfiles))
+    incfiles = list(set(incfiles))
     incfiles.sort()
 
     # Build the archive command