Rename project

This commit is contained in:
Einar Forselv
2019-12-03 09:40:02 +01:00
parent 2a861b0519
commit fc5c6cc914
18 changed files with 59 additions and 57 deletions

View File

@@ -0,0 +1,19 @@
import os
class Config:
"""Bag for config values"""
def __init__(self, check=True):
self.repository = os.environ['RESTIC_REPOSITORY']
self.password = os.environ['RESTIC_PASSWORD']
self.docker_base_url = os.environ.get('DOCKER_BASE_URL') or "unix://tmp/docker.sock"
if check:
self.check()
def check(self):
if not self.repository:
raise ValueError("CONTAINER env var not set")
if not self.password:
raise ValueError("PASSWORD env var not set")