Fix logging
This commit is contained in:
parent
972bb5a920
commit
f79097cae9
2 changed files with 1 additions and 16 deletions
|
|
@ -1,9 +1,7 @@
|
|||
import json
|
||||
import os
|
||||
import subprocess as sp
|
||||
import sys
|
||||
|
||||
from os.path import isdir
|
||||
from os.path import join as join_path
|
||||
from ucloud.settings import settings
|
||||
from ucloud.shared import shared
|
||||
|
|
@ -21,19 +19,6 @@ def qemu_img_type(path):
|
|||
qemu_img_info = json.loads(qemu_img_info.decode("utf-8"))
|
||||
return qemu_img_info["format"]
|
||||
|
||||
def check():
|
||||
""" check whether settings are sane, refuse to start if they aren't """
|
||||
if settings['storage']['storage_backend'] == 'filesystem' and not isdir(settings['storage']['image_dir']):
|
||||
sys.exit("You have set STORAGE_BACKEND to filesystem, but "
|
||||
"{} does not exist. Refusing to start".format(settings['storage']['image_dir'])
|
||||
)
|
||||
|
||||
try:
|
||||
sp.check_output(['which', 'qemu-img'])
|
||||
except Exception:
|
||||
print("qemu-img missing")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def main():
|
||||
# We want to get images entries that requests images to be created
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue