Esempio n. 1
0
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)
Esempio n. 2
0
 def _read_opref(self):
     return util.try_read(self._opref_path())
Esempio n. 3
0
 def remote(self):
     remote_lock_file = self.guild_path("LOCK.remote")
     return util.try_read(remote_lock_file, apply=str.strip)
Esempio n. 4
0
 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)