From fc89acf6797f3c642ba608e572a94065897474e9 Mon Sep 17 00:00:00 2001 From: sconklin Date: Fri, 15 Dec 2006 22:41:33 +0000 Subject: Removed meaningless error when target of a symlink had already been copied to the destination tree git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@63 ef72aa8b-4018-0410-8976-d6e080ef94d8 --- src/lib/sos/plugintools.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/lib') diff --git a/src/lib/sos/plugintools.py b/src/lib/sos/plugintools.py index eb9a32dc..f6b9e40b 100644 --- a/src/lib/sos/plugintools.py +++ b/src/lib/sos/plugintools.py @@ -127,11 +127,12 @@ class PluginBase: # Recurse to copy whatever it points to newpath = os.path.normpath(os.path.join(os.path.dirname(srcpath), link)) - if os.path.exists(newpath): - try: - self.doCopyFileOrDir(newpath) - except: - sys.stderr.write("3Problem at path %s" % newpath) + try: + self.doCopyFileOrDir(newpath) + except EnvironmentError, (errno, strerror): + if (errno != 17): + # we ignore 'file exists' errors + sys.stderr.write("3Problem at path %s\n" % newpath) sys.stderr.flush() return abspath -- cgit