Merge branch 'fix-issuebot-48' into 'master'

import: fix error when using python3-git from stretch

Closes #48 and issuebot#48

See merge request fdroid/fdroidserver!993
This commit is contained in:
Hans-Christoph Steiner 2021-08-10 07:58:12 +00:00
commit 5e35c20d5d

View file

@ -254,7 +254,10 @@ def main():
sys.exit(1)
elif tmp_importer_dir:
# For Windows: Close the repo or a git.exe instance holds handles to repo
git_repo.close()
try:
git_repo.close()
except AttributeError: # Debian/stretch's version does not have close()
pass
# TODO: Python3.9: Accepts a path-like object for both src and dst.
shutil.move(str(tmp_importer_dir), str(build_dir))
Path('build/.fdroidvcs-' + appid).write_text(app.RepoType + ' ' + app.Repo)