implemented docker
This commit is contained in:
10
crane.py
10
crane.py
@@ -8,14 +8,22 @@ import datetime
|
||||
import logging
|
||||
import requests
|
||||
from tomllib import load
|
||||
import os
|
||||
|
||||
class Crn:
|
||||
def __init__(self):
|
||||
"""Main object, should be calling functions from qlist.py, qlogging.py and qprocess.py"""
|
||||
# Open the config. Needs a json file with the data in config.json.example
|
||||
self.st = datetime.datetime.now()
|
||||
with open('./config.toml', 'rb') as c:
|
||||
|
||||
config_file_path=os.environ["toml_path"]
|
||||
with open(config_file_path, 'rb') as c:
|
||||
self.config = load(c)
|
||||
if os.path.exists('./config.toml'):
|
||||
config_file_path = './config.toml'
|
||||
with open(config_file_path, 'rb') as c:
|
||||
self.config = load(c)
|
||||
|
||||
# Create the api object
|
||||
self.cc = requests
|
||||
# Create the logging and pushover objects
|
||||
|
||||
Reference in New Issue
Block a user