Esempio n. 1
0
 def _get_pickle_path(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Datamonitor')
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return os.path.join(path, cls.__name__ + '.pickle')
Esempio n. 2
0
 def _get_pickle_path(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Datadog')
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return os.path.join(path, cls.__name__ + '.pickle')
Esempio n. 3
0
 def _get_dir(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Datadog')
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return path
Esempio n. 4
0
 def _get_dir(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Datadog')
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return path
Esempio n. 5
0
 def _get_pickle_path(cls, prefix=""):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'StackState')
         if not os.path.isdir(path):
             path = tempfile.gettempdir()
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return os.path.join(path, prefix + cls.__name__ + '.pickle')
Esempio n. 6
0
File: jmx.py Progetto: ufou/sd-agent
 def _get_dir(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Server Density')
         if not os.path.isdir(path):
             path = tempfile.gettempdir()
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return path
Esempio n. 7
0
 def _get_dir(cls):
     if Platform.is_win32():
         path = os.path.join(_windows_commondata_path(), 'Server Density')
         if not os.path.isdir(path):
             path = tempfile.gettempdir()
     elif os.path.isdir(PidFile.get_dir()):
         path = PidFile.get_dir()
     else:
         path = tempfile.gettempdir()
     return path