Skip to content

Commit

Permalink
refactored how the config.py data is accessed
Browse files Browse the repository at this point in the history
  • Loading branch information
shitwolfymakes authored and wolfy committed Mar 28, 2022
1 parent e715f85 commit a6684ff
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
6 changes: 3 additions & 3 deletions arm/ui/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import sys # noqa: F401
import os # noqa: F401
import bcrypt # noqa: F401
import arm.config.config as cfg

from flask import Flask, logging, current_app # noqa: F401
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_cors import CORS
from arm.config.config import cfg
from flask.logging import default_handler # noqa: F401
from getpass import getpass # noqa: F401
# import omdb

from flask_login import LoginManager

sqlitefile = 'sqlite:///' + arm_config['DBFILE']
sqlitefile = 'sqlite:///' + cfg.arm_config['DBFILE']

app = Flask(__name__)
CORS(app, resources={r"/*": {"origins": "*", "send_wildcard": "False"}})
Expand All @@ -25,7 +25,7 @@
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
# We should really gen a key for each system
app.config['SECRET_KEY'] = "Big secret key"
app.config['LOGIN_DISABLED'] = arm_config['DISABLE_LOGIN']
app.config['LOGIN_DISABLED'] = cfg.arm_config['DISABLE_LOGIN']

db = SQLAlchemy(app)

Expand Down
2 changes: 0 additions & 2 deletions scripts/arm_launcher.sh

This file was deleted.

8 changes: 0 additions & 8 deletions setup/arm-udev.rules

This file was deleted.

2 changes: 1 addition & 1 deletion setup/docker-arm.rules
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# this rule will trigger twice
# 1. for the media change event (script exits early in this case)
# 2. after udev rules have loaded media details
ACTION=="change", SUBSYSTEM=="block", ENV{DISK_MEDIA_CHANGE}=="1", ENV{ID_TYPE}=="cd", RUN+="/opt/arm/scripts/docker/docker_arm_wrapper.sh %k"
ACTION=="change", SUBSYSTEM=="block", RUN+="/opt/arm/scripts/docker/docker_arm_wrapper.sh %k"

0 comments on commit a6684ff

Please sign in to comment.