bitkeeper revision 1.689 (40118468UT1zIR80oFQpa0jMSoyUvA)

XenoUtil.py:
  Fix XenoUtil.py to import only what is necessary.
This commit is contained in:
kaf24@scramble.cl.cam.ac.uk committed 2004-01-23 20:30:32 +00:00
1 parent e83cf0f7c0
commit 735fd5d5b8
1 file changed
+13 -1
+13 -1
View File
@@ -1,4 +1,4 @@
import string, re, os, sqlite, Xc, sys
import string, re, os, sys
##### Module variables
@@ -16,6 +16,16 @@ VD_DB_FILE = "/var/spool/xen_vdisks.sqlite"
"""
VBD_EXPERT_MODE = 0
##### Module initialisation
try:
# try to import sqlite (not everyone will have it installed)
import sqlite
except ImportError:
# on failure, just catch the error, don't do anything
pass
##### Networking-related functions
def get_current_ipaddr(dev='eth0'):
@@ -808,6 +818,8 @@ def vd_extents_validate(new_extents,new_writeable):
exceed VBD_EXPERT_MODE or -1 if it does (error)
"""
import Xc # this is only needed in this function
xc = Xc.new()
##### Probe for explicitly created virtual disks and build a list
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.