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:
Daniel Martí 2014-07-09 10:30:28 +02:00
parent f857169317
commit 2c55fb499c

View file

@ -406,13 +406,21 @@ class vcs:
if deleterepo:
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 writeback:
if writeback and not self.clone_failed:
with open(fdpath, 'w') as f:
f.write(cdata)
if exc is not None:
raise exc
# Derived classes need to implement this. It's called once basic checking
# has been performend.
def gotorevisionx(self, rev):