summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbiao716.wang <biao716.wang@samsung.com>2023-08-29 21:30:53 +0900
committerbiao716.wang <biao716.wang@samsung.com>2023-08-29 21:30:53 +0900
commitba67c11e6054062a5a5258bc628265fa394e12c6 (patch)
treef3d6236a571930b24fb618b52c1a2132b97e00e4
parent18e58cea3a759287be93808a0beeb42113b19c46 (diff)
downloadgit-buildpackage-ba67c11e6054062a5a5258bc628265fa394e12c6.tar.gz
git-buildpackage-ba67c11e6054062a5a5258bc628265fa394e12c6.tar.bz2
git-buildpackage-ba67c11e6054062a5a5258bc628265fa394e12c6.zip
fix gbs export error
Change-Id: I8fb9b2654f2020bbf03e6e429f8bb395a7e345f8 Signed-off-by: biao716.wang <biao716.wang@samsung.com>
-rw-r--r--gbp/config.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gbp/config.py b/gbp/config.py
index 0f0bdc6f..8b659240 100644
--- a/gbp/config.py
+++ b/gbp/config.py
@@ -371,15 +371,15 @@ class GbpOptionParser(OptionParser):
# Read per-tree config file
if repo and git_treeish and filename.startswith('%(top_dir)s/'):
- with tempfile.TemporaryFile() as tmp:
+ with tempfile.NamedTemporaryFile() as tmp:
relpath = filename.replace('%(top_dir)s/', '')
try:
config = repo.show('%s:%s' % (git_treeish, relpath))
- tmp.writelines(config)
+ tmp.write(config)
except GitRepositoryError:
pass
tmp.seek(0)
- parser.readfp(tmp)
+ parser.read(tmp.name)
return
try:
filename = filename % str_fields