summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
Diffstat (limited to 'project.py')
-rw-r--r--project.py20
1 files changed, 6 insertions, 14 deletions
diff --git a/project.py b/project.py
index fe88a505..634d88c5 100644
--- a/project.py
+++ b/project.py
@@ -1182,10 +1182,8 @@ class Project(object):
1182 self._InitMRef() 1182 self._InitMRef()
1183 else: 1183 else:
1184 self._InitMirrorHead() 1184 self._InitMirrorHead()
1185 try: 1185 platform_utils.remove(os.path.join(self.gitdir, 'FETCH_HEAD'),
1186 platform_utils.remove(os.path.join(self.gitdir, 'FETCH_HEAD')) 1186 missing_ok=True)
1187 except OSError:
1188 pass
1189 return True 1187 return True
1190 1188
1191 def PostRepoUpgrade(self): 1189 def PostRepoUpgrade(self):
@@ -2307,15 +2305,12 @@ class Project(object):
2307 cmd.append('+refs/tags/*:refs/tags/*') 2305 cmd.append('+refs/tags/*:refs/tags/*')
2308 2306
2309 ok = GitCommand(self, cmd, bare=True).Wait() == 0 2307 ok = GitCommand(self, cmd, bare=True).Wait() == 0
2310 if os.path.exists(bundle_dst): 2308 platform_utils.remove(bundle_dst, missing_ok=True)
2311 platform_utils.remove(bundle_dst) 2309 platform_utils.remove(bundle_tmp, missing_ok=True)
2312 if os.path.exists(bundle_tmp):
2313 platform_utils.remove(bundle_tmp)
2314 return ok 2310 return ok
2315 2311
2316 def _FetchBundle(self, srcUrl, tmpPath, dstPath, quiet, verbose): 2312 def _FetchBundle(self, srcUrl, tmpPath, dstPath, quiet, verbose):
2317 if os.path.exists(dstPath): 2313 platform_utils.remove(dstPath, missing_ok=True)
2318 platform_utils.remove(dstPath)
2319 2314
2320 cmd = ['curl', '--fail', '--output', tmpPath, '--netrc', '--location'] 2315 cmd = ['curl', '--fail', '--output', tmpPath, '--netrc', '--location']
2321 if quiet: 2316 if quiet:
@@ -2739,10 +2734,7 @@ class Project(object):
2739 # If the source file doesn't exist, ensure the destination 2734 # If the source file doesn't exist, ensure the destination
2740 # file doesn't either. 2735 # file doesn't either.
2741 if name in symlink_files and not os.path.lexists(src): 2736 if name in symlink_files and not os.path.lexists(src):
2742 try: 2737 platform_utils.remove(dst, missing_ok=True)
2743 platform_utils.remove(dst)
2744 except OSError:
2745 pass
2746 2738
2747 except OSError as e: 2739 except OSError as e:
2748 if e.errno == errno.EPERM: 2740 if e.errno == errno.EPERM: