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 subprocess
|
||||||
import json
|
import json
|
||||||
|
|
||||||
global matrixPing, matrixUserToPing, matrixUserServer, matrixRoom
|
|
||||||
|
|
||||||
state_dir = Path(
|
state_dir = Path(
|
||||||
os.environ.get("XDG_STATE_HOME", Path.home() / ".local" / "state")
|
os.environ.get("XDG_STATE_HOME", Path.home() / ".local" / "state")
|
||||||
) / "nixpkgs-notifier"
|
) / "nixpkgs-notifier"
|
||||||
@@ -187,6 +185,16 @@ def fetchStatus(PRnumber):
|
|||||||
def main():
|
def main():
|
||||||
# fetch config
|
# fetch config
|
||||||
cfg = load_config()
|
cfg = load_config()
|
||||||
|
|
||||||
|
global configTime
|
||||||
|
global configFetchTime
|
||||||
|
global shouldLocalNotify
|
||||||
|
global shouldMatrixNotify
|
||||||
|
global matrixRoom
|
||||||
|
global matrixPing
|
||||||
|
global matrixUserToPing
|
||||||
|
global matrixUserServer
|
||||||
|
|
||||||
configTime = cfg["configTime"]
|
configTime = cfg["configTime"]
|
||||||
configFetchTime = cfg["configFetchTime"]
|
configFetchTime = cfg["configFetchTime"]
|
||||||
shouldLocalNotify = cfg["localNotify"]
|
shouldLocalNotify = cfg["localNotify"]
|
||||||
|
|||||||
Reference in New Issue
Block a user