Skip to content

LocalManager has a hard-coded reference to "~/.pcocc" instead of using PCOCC_USER_CONF_DIR#10

Description

@ypsah

It could be when we start migrating to the XDG Base Directory Specification. 馃槈
Unless this is not a bug, files are not ending up in the right directory anyway.

I think XDG_CACHE_HOME could be the right path to use:

def xdg_cache_home():
    try:
        return os.environ['XDG_CACHE_HOME']
    except KeyError:
        return os.path.join(os.environ['HOME'], '.cache')

class LocalManager(EtcdManager):
    def __init__(self, batchid, batchname, default_batchname, settings,
                 proc_type, batchuser):
        (...)
        self.pcocc_state_dir = os.path.join(xdg_cache_home(), 'pcocc',
                                            something)
        (...)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions