Permalink
Browse files

bug 838571 - autophone - use shutil.move instead of os.rename, r=mcote

  • Loading branch information...
1 parent cebc24d commit 771dcca73c053fe3007288c1ffd1ee32e19e4c89 @bclary bclary committed Feb 5, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 builds.py
View
@@ -237,7 +237,7 @@ def get(self, buildurl, enable_unittests, force=False):
logging.error('IO Error retrieving build: %s.' % buildurl)
logging.error(traceback.format_exc())
return None
- os.rename(tmpf.name, build_path)
+ shutil.move(tmpf.name, build_path)
file(os.path.join(cache_build_dir, 'lastused'), 'w')
symbols_path = os.path.join(cache_build_dir, 'symbols')
if force or not os.path.exists(symbols_path):
@@ -295,7 +295,7 @@ def get(self, buildurl, enable_unittests, force=False):
robocop_url)
logging.error(traceback.format_exc())
return None
- os.rename(tmpf.name, robocop_path)
+ shutil.move(tmpf.name, robocop_path)
# XXX: assumes fixed buildurl-> fennec_ids.txt mapping
fennec_ids_url = urlparse.urljoin(buildurl, 'fennec_ids.txt')
fennec_ids_path = os.path.join(cache_build_dir, 'fennec_ids.txt')
@@ -309,7 +309,7 @@ def get(self, buildurl, enable_unittests, force=False):
fennec_ids_url)
logging.error(traceback.format_exc())
return None
- os.rename(tmpf.name, fennec_ids_path)
+ shutil.move(tmpf.name, fennec_ids_path)
return cache_build_dir
def clean_cache(self, preserve=[]):

0 comments on commit 771dcca

Please sign in to comment.