Commit a716819f authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Use py-sendfile in favor of pysendfile

The former is older but there are packages for it in distros like
Ubuntu.
parent 3dfe3651
...@@ -443,7 +443,8 @@ class DiskDevice(object): ...@@ -443,7 +443,8 @@ class DiskDevice(object):
progressbar.next() progressbar.next()
while left > 0: while left > 0:
length = min(left, blocksize) length = min(left, blocksize)
sent = sendfile(dst.fileno(), src.fileno(), offset, length) _, sent = sendfile(dst.fileno(), src.fileno(), offset,
length)
offset += sent offset += sent
left -= sent left -= sent
progressbar.goto((size - left) // MB) progressbar.goto((size - left) // MB)
......
...@@ -46,7 +46,7 @@ setup( ...@@ -46,7 +46,7 @@ setup(
license='BSD', license='BSD',
packages=find_packages(), packages=find_packages(),
include_package_data=True, include_package_data=True,
install_requires=['sh', 'ansicolors', 'progress>=1.0.2', 'pysendfile'], install_requires=['sh', 'ansicolors', 'progress>=1.0.2', 'py-sendfile'],
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
'snf-image-creator = image_creator.main:main', 'snf-image-creator = image_creator.main:main',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment