With newer Python versions, codecs.open() is deprecated:
https://docs.python.org/3/library/codecs.html#codecs.open
Replace it with the preferred call to open().
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
import textwrap
import subprocess
import collections
- import codecs
outdir = d.getVar('PKGWRITEDIRDEB')
pkgdest = d.getVar('PKGDEST')
bb.utils.mkdirhier(controldir)
os.chmod(controldir, 0o755)
- ctrlfile = codecs.open(os.path.join(controldir, 'control'), 'w', 'utf-8')
+ ctrlfile = open(os.path.join(controldir, 'control'), mode='w', encoding='utf-8')
fields = []
pe = d.getVar('PKGE')