mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 23:42:37 +03:00
Do write .fdroidvcs if the clone succeeded
If the clone succeeded but the checkout failed, it didn't. Now it does, by keeping the exception and raising it a bit later.
This commit is contained in:
parent
f857169317
commit
2c55fb499c
1 changed files with 10 additions and 2 deletions
|
@ -406,13 +406,21 @@ class vcs:
|
||||||
if deleterepo:
|
if deleterepo:
|
||||||
shutil.rmtree(self.local)
|
shutil.rmtree(self.local)
|
||||||
|
|
||||||
self.gotorevisionx(rev)
|
exc = None
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.gotorevisionx(rev)
|
||||||
|
except FDroidException, e:
|
||||||
|
exc = e
|
||||||
|
|
||||||
# If necessary, write the .fdroidvcs file.
|
# If necessary, write the .fdroidvcs file.
|
||||||
if writeback:
|
if writeback and not self.clone_failed:
|
||||||
with open(fdpath, 'w') as f:
|
with open(fdpath, 'w') as f:
|
||||||
f.write(cdata)
|
f.write(cdata)
|
||||||
|
|
||||||
|
if exc is not None:
|
||||||
|
raise exc
|
||||||
|
|
||||||
# Derived classes need to implement this. It's called once basic checking
|
# Derived classes need to implement this. It's called once basic checking
|
||||||
# has been performend.
|
# has been performend.
|
||||||
def gotorevisionx(self, rev):
|
def gotorevisionx(self, rev):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue