mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
36f7b8ffe9
If no "dest" argument is specified when calling CpioRead.copyin or CpioRead.copyin_file, a TypeError occurs in CpioRead._copyin_file because os.getcwd(), which returns a str, is used as dest and, hence, the subsequent os.path.join(...) fails (because it tries to join a str and a bytes). In order to avoid this, encode the result of os.getcwd(). Note that the existing archive.copyin_file(hdr.filename, os.path.dirname(tmpfile), os.path.basename(tmpfile)) was OK because CpioRead._copyin_file os.path.join()s "dest" and "new_fn", which are both str. It is just changed to stress that CpioRead is a bytes-only API. Fixes: #865 ("Traceback in osc/util/cpio.py line 128: TypeError: Can't mix strings and bytes in path components") |
||
---|---|---|
.. | ||
util | ||
__init__.py | ||
.gitignore | ||
babysitter.py | ||
build.py | ||
checker.py | ||
cmdln.py | ||
commandline.py | ||
conf.py | ||
core.py | ||
credentials.py | ||
fetch.py | ||
grabber.py | ||
meter.py | ||
OscConfigParser.py | ||
oscerr.py | ||
oscssl.py | ||
oscsslexcp.py |