Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 584997 Details for
Bug 821524
Use XDG dirs instead of $HOME
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed patch
Fix-for-Bug-821524.patch (text/plain), 2.52 KB, created by
Javier Hernandez
on 2012-05-16 15:05:48 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Javier Hernandez
Created:
2012-05-16 15:05:48 UTC
Size:
2.52 KB
patch
obsolete
>From ddcdfd0a0bcd86907f2c9727bd2c8e3b71bdeb8d Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Javier=20Hern=C3=A1ndez?= <jhernandez@emergya.com> >Date: Wed, 16 May 2012 16:57:59 +0200 >Subject: [PATCH] Fix for Bug 821524 - Use XDG dirs instead of $HOME > >--- > src/virtManager/cli.py | 4 +++- > src/virtManager/util.py | 3 ++- > src/virtManagerTui/libvirtworker.py | 5 ++++- > 3 files changed, 9 insertions(+), 3 deletions(-) > >diff --git a/src/virtManager/cli.py b/src/virtManager/cli.py >index 3be6945..5248ee1 100644 >--- a/src/virtManager/cli.py >+++ b/src/virtManager/cli.py >@@ -26,6 +26,8 @@ import traceback > import locale > import gettext > >+from xdg import BaseDirectory >+ > import libvirt > > def setup_logging(appname, debug_stdout): >@@ -42,7 +44,7 @@ def setup_logging(appname, debug_stdout): > DATEFMT = "%a, %d %b %Y %H:%M:%S" > > # set up logging >- vm_dir = os.path.expanduser("~/%s" % DIR_NAME) >+ vm_dir = os.path.join(BaseDirectory.xdg_data_home, DIR_NAME) > if not os.access(vm_dir, os.W_OK): > if os.path.exists(vm_dir): > raise RuntimeError("No write access to %s" % vm_dir) >diff --git a/src/virtManager/util.py b/src/virtManager/util.py >index 6b8a953..d6cbbd2 100644 >--- a/src/virtManager/util.py >+++ b/src/virtManager/util.py >@@ -22,6 +22,7 @@ import libvirt > > import logging > import os.path >+from xdg import BaseDirectory > > import virtManager > import virtinst >@@ -33,7 +34,7 @@ xml_escape = virtinst.util.xml_escape > # FIXME: selinux policy also has a ~/VirtualMachines/isos dir > def get_default_pool_path(conn): > if conn.is_session_uri(): >- return os.path.expanduser("~/VirtualMachines") >+ return os.path.join(BaseDirectory.xdg_data_home, "VirtualMachines") > return "/var/lib/libvirt/images" > > def get_default_pool_name(conn): >diff --git a/src/virtManagerTui/libvirtworker.py b/src/virtManagerTui/libvirtworker.py >index a73522e..4e189b7 100644 >--- a/src/virtManagerTui/libvirtworker.py >+++ b/src/virtManagerTui/libvirtworker.py >@@ -19,6 +19,8 @@ > import os > import logging > >+from xdg import BaseDirectory >+ > import virtinst > import libvirt > >@@ -44,7 +46,8 @@ def get_default_url(): > class VirtManagerConfig: > def __init__(self, filename=None): > if filename is None: >- filename = os.path.expanduser("~/.virt-manager/virt-manager-tui.conf") >+ filename = os.path.join(BaseDirectory.xdg_data_home, \ >+ ".virt-manager/virt-manager-tui.conf") > self.__filename = filename > > def get_connection_list(self): >-- >1.7.7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 821524
: 584997