[cedar-backup-svn] SF.net SVN: cedar-backup:[947] cedar-backup2/trunk
Brought to you by:
pronovic
|
From: <pro...@us...> - 2009-08-16 18:47:42
|
Revision: 947
http://cedar-backup.svn.sourceforge.net/cedar-backup/?rev=947&view=rev
Author: pronovic
Date: 2009-08-16 18:47:36 +0000 (Sun, 16 Aug 2009)
Log Message:
-----------
Use set built-in rather than deprecated sets.Set when available.
Modified Paths:
--------------
cedar-backup2/trunk/CedarBackup2/peer.py
cedar-backup2/trunk/Changelog
Modified: cedar-backup2/trunk/CedarBackup2/peer.py
===================================================================
--- cedar-backup2/trunk/CedarBackup2/peer.py 2009-08-16 18:39:18 UTC (rev 946)
+++ cedar-backup2/trunk/CedarBackup2/peer.py 2009-08-16 18:47:36 UTC (rev 947)
@@ -56,7 +56,6 @@
import os
import logging
import shutil
-import sets
import re
# Cedar Backup modules
@@ -923,8 +922,7 @@
Returns the contents of a directory in terms of a Set.
The directory's contents are read as a L{FilesystemList} containing only
- files, and then the list is converted into a C{sets.Set} object for later
- use.
+ files, and then the list is converted into a set object for later use.
@param path: Directory path to get contents for
@type path: String representing a path on disk
@@ -936,7 +934,11 @@
contents.excludeDirs = True
contents.excludeLinks = True
contents.addDirContents(path)
- return sets.Set(contents)
+ try:
+ return set(contents)
+ except:
+ import sets
+ return sets.Set(contents)
_getDirContents = staticmethod(_getDirContents)
def _copyRemoteDir(remoteUser, localUser, remoteHost, rcpCommand, rcpCommandList,
Modified: cedar-backup2/trunk/Changelog
===================================================================
--- cedar-backup2/trunk/Changelog 2009-08-16 18:39:18 UTC (rev 946)
+++ cedar-backup2/trunk/Changelog 2009-08-16 18:47:36 UTC (rev 947)
@@ -2,6 +2,7 @@
* Fix testGenerateTarfile_002() so it works with Python 2.6.
* Use hashlib instead of deprecated sha module when available.
+ * Use set built-in rather than deprecated sets.Set when available.
Version 2.19.3 29 Mar 2009
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|