summaryrefslogtreecommitdiff
path: root/distutils2/command
diff options
context:
space:
mode:
authorFELD Boris <lothiraldan@gmail.com>2011-01-30 14:42:59 +0100
committerFELD Boris <lothiraldan@gmail.com>2011-01-30 14:42:59 +0100
commit57b7580dada83b93bcea4f77b3c50069399fc488 (patch)
treea1459ccd2f3478d8b92fd70917966c0b144148eb /distutils2/command
parent162c4cae8806f33a29903c01cfd7fc9a635429f5 (diff)
downloaddisutils2-57b7580dada83b93bcea4f77b3c50069399fc488.tar.gz
Fix last bug, check that data file not exists at the same path and has the same content.
Diffstat (limited to 'distutils2/command')
-rw-r--r--distutils2/command/install_data.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/distutils2/command/install_data.py b/distutils2/command/install_data.py
index 8ef089d..b7a9498 100644
--- a/distutils2/command/install_data.py
+++ b/distutils2/command/install_data.py
@@ -10,6 +10,7 @@ import os
from distutils2.command.cmd import Command
from distutils2.util import change_root, convert_path
from distutils2._backport.sysconfig import get_paths, format_value
+from distutils2._backport.shutil import Error
class install_data(Command):
@@ -47,7 +48,11 @@ class install_data(Command):
dir_dest = os.path.abspath(os.path.dirname(destination))
self.mkpath(dir_dest)
- (out, _) = self.copy_file(file[0], dir_dest)
+ try:
+ (out, _) = self.copy_file(file[0], dir_dest)
+ except Error, e:
+ self.warn(e.message)
+ out = destination
self.outfiles.append(out)
self.data_files_out.append((file[0], destination))