Add EnvironmentApi
This commit is contained in:
parent
85250f1c5f
commit
befb5eb653
1 changed files with 12 additions and 1 deletions
|
@ -3,7 +3,7 @@ import re
|
|||
import subprocess as sub
|
||||
from abc import ABC, abstractmethod
|
||||
from pathlib import Path
|
||||
|
||||
from os import environ
|
||||
|
||||
class FileHandler(ABC):
|
||||
|
||||
|
@ -235,3 +235,14 @@ class GitApi():
|
|||
def checkout(self, branch: str):
|
||||
self.system_api.run_checked('git', 'checkout', branch)
|
||||
return self.system_api.stdout
|
||||
|
||||
class EnvironmentApi():
|
||||
|
||||
def __init__(self):
|
||||
self.environ = environ
|
||||
|
||||
def get(self, key):
|
||||
return self.environ[key]
|
||||
|
||||
def set(self, key, value):
|
||||
self.environ[key] = value
|
Loading…
Reference in a new issue