~nataliabidart/ubuntuone-client/careful-logging

« back to all changes in this revision

Viewing changes to ubuntuone/platform/xdg_base_directory/__init__.py

  • Committer: Tarmac
  • Author(s): ralsina
  • Date: 2011-08-25 16:23:13 UTC
  • mfrom: (1110.2.2 log-betterest)
  • Revision ID: tarmac-20110825162313-q9cjx1epvy096j3k
Remove the xdg implementation from ubuntuone-client (it's now in SSO), but keep ubuntuone_log_dir in the same place to avoid breaking other stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# You should have received a copy of the GNU General Public License along
15
15
# with this program.  If not, see <http://www.gnu.org/licenses/>.
16
16
 
17
 
"""XDG multiplatform."""
 
17
"""Defines a constant for ubuntuone's log folder based on XDG."""
18
18
 
19
19
import os
20
 
import sys
21
20
 
22
 
if sys.platform == "win32":
23
 
    from ubuntuone.platform.xdg_base_directory import windows
24
 
    load_config_paths = windows.load_config_paths
25
 
    save_config_path = windows.save_config_path
26
 
    xdg_cache_home = windows.xdg_cache_home
27
 
    xdg_data_home = windows.xdg_data_home
28
 
else:
29
 
    import xdg.BaseDirectory
30
 
    load_config_paths = xdg.BaseDirectory.load_config_paths
31
 
    save_config_path = xdg.BaseDirectory.save_config_path
32
 
    xdg_cache_home = xdg.BaseDirectory.xdg_cache_home
33
 
    xdg_data_home = xdg.BaseDirectory.xdg_data_home
 
21
from ubuntu_sso.xdg_base_directory import xdg_cache_home
34
22
 
35
23
ubuntuone_log_dir = os.path.join(xdg_cache_home, 'ubuntuone', 'log')
36
24
if not os.path.exists(ubuntuone_log_dir):