rpm: Open tempfile in text mode
authorJochen Sprickerhof <jspricke@debian.org>
Sat, 30 Jan 2021 14:03:25 +0000 (15:03 +0100)
committerGuido Günther <agx@sigxcpu.org>
Sun, 31 Jan 2021 12:04:47 +0000 (13:04 +0100)
gbp/rpm/lib_rpm.py

index 5fc0354e31a20c4b5932692dd654b4afa1ec2ad3..4ef741d39230c5523aaa09b7105c4a36ff2dcc22 100644 (file)
@@ -31,7 +31,7 @@ except ImportError:
     import rpm as librpm
 
 # Module initialization
-_rpmlog = tempfile.NamedTemporaryFile(prefix='gbp_rpmlog')
+_rpmlog = tempfile.NamedTemporaryFile(mode='w+', prefix='gbp_rpmlog')
 _rpmlogfd = _rpmlog.file
 librpm.setVerbosity(librpm.RPMLOG_INFO)
 librpm.setLogFile(_rpmlogfd)