예제 #1
0
파일: s3.py 프로젝트: wangsd01/guildai
def _env_from_file(path):
    if path.lower().endswith(".gpg"):
        env_str = _try_read_gpg(path)
    else:
        env_str = util.try_read(path)
    if not env_str:
        log.warning("cannot read remote env from %s - ignorning", path)
        return {}
    return _decode_env(env_str)
예제 #2
0
 def _read_opref(self):
     return util.try_read(self._opref_path())
예제 #3
0
 def remote(self):
     remote_lock_file = self.guild_path("LOCK.remote")
     return util.try_read(remote_lock_file, apply=str.strip)
예제 #4
0
파일: s3.py 프로젝트: wingkitlee0/guildai
 def _local_meta_id(self):
     id_path = os.path.join(self.local_sync_dir, "meta-id")
     return util.try_read(id_path, apply=str.strip)