Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
vmdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e5339ccb
authored
Sep 06, 2013
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing disconnect when LIBVIRT_KEEPALIVE is defined
parent
b103d9bc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
vmdriver.py
+3
-2
No files found.
vmdriver.py
100755 → 100644
View file @
e5339ccb
#!/usr/bin/env python
import
libvirt
import
libvirt
import
logging
import
logging
import
os
import
os
...
@@ -69,12 +67,15 @@ def disconnect():
...
@@ -69,12 +67,15 @@ def disconnect():
'''Disconnect from the active libvirt daemon connection.
'''Disconnect from the active libvirt daemon connection.
'''
'''
global
connection
global
connection
if
os
.
getenv
(
'LIBVIRT_KEEPALIVE'
)
is
None
:
if
connection
is
None
:
if
connection
is
None
:
logging
.
debug
(
'There is no available libvirt conection.'
)
logging
.
debug
(
'There is no available libvirt conection.'
)
else
:
else
:
connection
.
close
()
connection
.
close
()
logging
.
debug
(
'Connection closed to libvirt.'
)
logging
.
debug
(
'Connection closed to libvirt.'
)
connection
=
None
connection
=
None
else
:
logging
.
debug
(
'Keepalive connection should not close.'
)
@celery.task
@celery.task
...
...
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