Beispiel #1
0
 def loadFromRCReader(cls, subsection, default):
     from rcmgr import RCMgr
     if not RCMgr.hasConfig():
         return default
     
     if not subsection in cls.locations:
         
         if RCMgr.has("Locations", subsection): 
             cls.locations[subsection] = RCMgr.get("Locations", subsection)
         else:
             cls.locations[subsection] = default
             
     cls.locations[subsection] = cls.locations[subsection].replace("${PID}", "%d" % os.getpid())
     return cls.EnsureMakeDirs(cls.locations[subsection])
Beispiel #2
0
    def get_path_from_rcfile(cls, subsection, default):
        from rcmgr import RCMgr
        if not RCMgr.has_config():
            return default

        if not subsection in cls._locations:

            if RCMgr.has('Locations', subsection):
                cls._locations[subsection] = RCMgr.get('Locations', subsection)
            else:
                cls._locations[subsection] = default

        cls._locations[subsection] = cls._locations[subsection].replace("${PID}", "%d" % os.getpid())
        return cls.ensure_dir_exists(cls._locations[subsection])
Beispiel #3
0
    def get_path_from_rcfile(cls, subsection, default):
        from rcmgr import RCMgr
        if not RCMgr.has_config():
            return default

        if not subsection in cls._locations:

            if RCMgr.has('Locations', subsection):
                cls._locations[subsection] = RCMgr.get('Locations', subsection)
            else:
                cls._locations[subsection] = default

        cls._locations[subsection] = cls._locations[subsection].replace(
            "${PID}", "%d" % os.getpid())
        return cls.ensure_dir_exists(cls._locations[subsection])