import and install gettext in vm_vdi_cleaner.py
importing some nova modules expects _() to be defined, so lets define it before we start importing them. Change-Id: I7f951a24c19a53434c090cd2c01eded77c703943
This commit is contained in:
@@ -17,12 +17,14 @@
|
||||
"""vm_vdi_cleaner.py - List or clean orphaned VDIs/instances on XenServer."""
|
||||
|
||||
import doctest
|
||||
import gettext
|
||||
import os
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
import XenAPI
|
||||
|
||||
gettext.install('nova', unicode=1)
|
||||
|
||||
possible_topdir = os.getcwd()
|
||||
if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")):
|
||||
|
||||
Reference in New Issue
Block a user