restic-compose-backup/restic_volume_backup/config.py

15 lines
334 B
Python
Raw Normal View History

2019-04-15 15:25:42 +00:00
import os
class Config:
repository = os.environ['RESTIC_REPOSITORY']
password = os.environ['RESTIC_PASSWORD']
@classmethod
def check(cls):
if not cls.repository:
raise ValueError("CONTAINER env var not set")
if not cls.password:
raise ValueError("PASSWORD env var not set")