summaryrefslogtreecommitdiffstats
path: root/pym/emerge/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/emerge/__init__.py')
-rw-r--r--pym/emerge/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 17ff8d58d..ac74f12d2 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -3754,14 +3754,17 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
icount=0
badcount=0
+ import shutil
for inforoot in regen_infodirs:
if inforoot=='':
continue
for filename in ("dir", "dir.gz", "dir.bz2"):
file_path = os.path.join(inforoot, filename)
+ if not os.path.exists(file_path):
+ continue
try:
- os.rename(file_path, file_path + ".old")
- except OSError, e:
+ shutil.move(file_path, file_path + ".old")
+ except EnvironmentError, e:
if e.errno != errno.ENOENT:
raise
del e