mirror of
https://github.com/tomasriveral/nixpkgs-notifier.git
synced 2026-08-11 18:28:38 +02:00
fix: config use global variables electric boogaloo
This commit is contained in:
+10
-2
@@ -9,8 +9,6 @@ from time import sleep
|
||||
import subprocess
|
||||
import json
|
||||
|
||||
global matrixPing, matrixUserToPing, matrixUserServer, matrixRoom
|
||||
|
||||
state_dir = Path(
|
||||
os.environ.get("XDG_STATE_HOME", Path.home() / ".local" / "state")
|
||||
) / "nixpkgs-notifier"
|
||||
@@ -187,6 +185,16 @@ def fetchStatus(PRnumber):
|
||||
def main():
|
||||
# fetch config
|
||||
cfg = load_config()
|
||||
|
||||
global configTime
|
||||
global configFetchTime
|
||||
global shouldLocalNotify
|
||||
global shouldMatrixNotify
|
||||
global matrixRoom
|
||||
global matrixPing
|
||||
global matrixUserToPing
|
||||
global matrixUserServer
|
||||
|
||||
configTime = cfg["configTime"]
|
||||
configFetchTime = cfg["configFetchTime"]
|
||||
shouldLocalNotify = cfg["localNotify"]
|
||||
|
||||
Reference in New Issue
Block a user