Use os.path.dirname() instead of os.path.split(...)[0]

This commit is contained in:
Aleksey Filippov 2018-03-12 18:06:38 +00:00 committed by Jussi Pakkanen
parent 6585427a7d
commit fe215bb826
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ def unpack(sproj, branch, outdir):
print(' expected:', dig)
print(' obtained:', should)
return 1
spdir = os.path.split(outdir)[0]
spdir = os.path.dirname(outdir)
ofilename = os.path.join(spdir, config['wrap-file']['source_filename'])
with open(ofilename, 'wb') as ofile:
ofile.write(us)