Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-image-creator
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
snf-image-creator
Commits
08f26796
Commit
08f26796
authored
12 years ago
by
Nikos Skalkotos
Browse files
Options
Downloads
Patches
Plain Diff
Fix a bug in Output.progress_generator
The progress bar of the progress generator had a wrong max attribute.
parent
e77e66a9
No related branches found
Branches containing commit
Tags
v0.2
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
image_creator/kamaki_wrapper.py
+4
-2
4 additions, 2 deletions
image_creator/kamaki_wrapper.py
image_creator/output.py
+3
-5
3 additions, 5 deletions
image_creator/output.py
with
7 additions
and
7 deletions
image_creator/kamaki_wrapper.py
+
4
−
2
View file @
08f26796
...
@@ -75,8 +75,10 @@ class Kamaki(object):
...
@@ -75,8 +75,10 @@ class Kamaki(object):
raise
FatalError
(
"
Pithos client: %d %s
"
%
\
raise
FatalError
(
"
Pithos client: %d %s
"
%
\
(
e
.
status
,
e
.
message
))
(
e
.
status
,
e
.
message
))
try
:
try
:
hash_cb
=
self
.
out
.
progress_gen
(
hp
)
if
hp
is
not
None
else
None
hash_cb
=
self
.
out
.
progress_generator
(
hp
)
\
upload_cb
=
self
.
out
.
progress_gen
(
up
)
if
up
is
not
None
else
None
if
hp
is
not
None
else
None
upload_cb
=
self
.
out
.
progress_generator
(
up
)
\
if
up
is
not
None
else
None
self
.
pithos_client
.
create_object
(
remote_path
,
file_obj
,
size
,
self
.
pithos_client
.
create_object
(
remote_path
,
file_obj
,
size
,
hash_cb
,
upload_cb
)
hash_cb
,
upload_cb
)
return
"
pithos://%s/%s/%s
"
%
\
return
"
pithos://%s/%s/%s
"
%
\
...
...
This diff is collapsed.
Click to expand it.
image_creator/output.py
+
3
−
5
View file @
08f26796
...
@@ -86,12 +86,10 @@ class Output(object):
...
@@ -86,12 +86,10 @@ class Output(object):
def
success
(
self
,
result
):
def
success
(
self
,
result
):
sucess
(
result
)
sucess
(
result
)
def
progress_gen
(
self
,
message
):
def
progress_generator
(
self
,
message
):
progress
=
getattr
(
self
,
'
Progress
'
)
def
generator
(
n
):
def
generator
(
n
):
progressbar
=
progress
(
message
,
'
default
'
)
progressbar
=
self
.
Progress
(
message
,
'
default
'
)
progressbar
.
max
=
n
for
_
in
range
(
n
):
for
_
in
range
(
n
):
yield
yield
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment