This also works in Python 2.7, and is a little clearer.
Signed-off-by: Simon McVittie <smcv@debian.org>
Forwarded: https://github.com/ostreedev/ostree/pull/1457
Gbp-Pq: Name test-concurrency-Use-Python-3-syntax-for-octal.patch
# different files with different checksums.
def mktree(dname, serial=0):
print('Creating tree', dname, file=sys.stderr)
- os.mkdir(dname, 0755)
+ os.mkdir(dname, 0o755)
for v in xrange(20):
with open('{}/{}'.format(dname, v), 'w') as f:
f.write('{} {} {}\n'.format(dname, serial, v))