Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-node
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor 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
Mirror
cc-node
Commits
93df8ca7
Commit
93df8ca7
authored
12 years ago
by
Anael Beutot
Browse files
Options
Downloads
Patches
Plain Diff
Fix logging message with async rpc calls.
In case of error.
parent
c651d2a5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ccnode/hypervisor/__init__.py
+6
-3
6 additions, 3 deletions
ccnode/hypervisor/__init__.py
with
6 additions
and
3 deletions
ccnode/hypervisor/__init__.py
+
6
−
3
View file @
93df8ca7
...
...
@@ -76,7 +76,8 @@ class Handler(HostHandler):
def
register_domain_cb
(
self
,
call_id
,
response
=
None
,
error
=
None
):
name
=
self
.
async_calls
.
pop
(
call_id
)
if
error
is
not
None
:
logger
.
error
(
'
Error while registering domain, %s
'
,
error
)
logger
.
error
(
'
Error while registering domain, %s(
"
%s
"
)
'
,
error
[
'
exception
'
],
error
[
'
message
'
])
return
logger
.
debug
(
'
Registered domain %s
'
,
name
)
...
...
@@ -242,7 +243,8 @@ class Hypervisor(object):
def
register_cb
(
self
,
call_id
,
response
=
None
,
error
=
None
):
vm
=
self
.
domains
[
self
.
async_calls
.
pop
(
call_id
)]
if
error
is
not
None
:
logger
.
error
(
'
Error while registering domain to server, %s
'
,
error
)
logger
.
error
(
'
Error while registering domain to server, %s(
"
%s
"
)
'
,
error
[
'
exception
'
],
error
[
'
message
'
])
logger
.
info
(
'
Add domain: %s (%s)
'
,
vm
.
name
,
vm
.
uuid
)
# add tags
for
tag
in
vm
.
tags
.
itervalues
():
...
...
@@ -251,7 +253,8 @@ class Hypervisor(object):
def
unregister_cb
(
self
,
call_id
,
response
=
None
,
error
=
None
):
vm_name
=
self
.
async_calls
.
pop
(
call_id
)
if
error
is
not
None
:
logger
.
error
(
'
Error while unregistering domain to server, %s
'
,
error
)
logger
.
error
(
'
Error while unregistering domain to server, %s(
"
%s
"
)
'
,
error
[
'
exception
'
],
error
[
'
message
'
])
logger
.
info
(
'
Delete domain: %s
'
,
vm_name
)
self
.
main
.
remove_sub_object
(
vm_name
)
...
...
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