Use coolo's way to hide the bug, but with a warning.

This commit is contained in:
Alberto Planas 2014-07-29 12:31:28 +02:00
parent 28655f02a8
commit 4d6ae4851c

View File

@ -277,10 +277,10 @@ def _check_repo_group(self, id_, requests, opts):
for d in downloads: for d in downloads:
if not os.path.exists(dir_): if not os.path.exists(dir_):
os.mkdir(dir_) os.mkdir(dir_)
try: target = os.path.join(dir_, os.path.basename(d))
os.symlink(d, os.path.join(dir_, os.path.basename(d))) if os.path.exists(target):
except OSError: print 'Warning, symlink already exists', d, target
print 'Warning, symlink already exists', d, os.path.join(dir_, os.path.basename(d)) os.unlink(target)
repochecker = os.path.join(self.plugin_dir, 'repo-checker.pl') repochecker = os.path.join(self.plugin_dir, 'repo-checker.pl')
civs = "LC_ALL=C perl %s '%s' -r %s -f %s" % (repochecker, destdir, self.repo_dir, params_file.name) civs = "LC_ALL=C perl %s '%s' -r %s -f %s" % (repochecker, destdir, self.repo_dir, params_file.name)