connection: Drop glib usage for cache dir
Our fallback implementation is the same as glib for all usage we care about, so don't bother with calling glib Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
49d16912c3
commit
156926b78d
|
@ -43,16 +43,7 @@ class VirtinstConnection(object):
|
|||
|
||||
@staticmethod
|
||||
def get_app_cache_dir():
|
||||
ret = ""
|
||||
try:
|
||||
# We don't want to depend on glib for virt-install
|
||||
from gi.repository import GLib
|
||||
ret = GLib.get_user_cache_dir()
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
if not ret:
|
||||
ret = os.environ.get("XDG_CACHE_HOME")
|
||||
ret = os.environ.get("XDG_CACHE_HOME")
|
||||
if not ret:
|
||||
ret = os.path.expanduser("~/.cache")
|
||||
return os.path.join(ret, "virt-manager")
|
||||
|
|
Loading…
Reference in New Issue