Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-image-creator
Commits
a716819f
Commit
a716819f
authored
Nov 02, 2012
by
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
Changes
2
Show whitespace changes
Inline
Side-by-side
image_creator/disk.py
View file @
a716819f
...
@@ -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
)
...
...
setup.py
View file @
a716819f
...
@@ -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'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment