mirror of
https://github.com/tomasriveral/nixpkgs-notifier.git
synced 2026-10-10 08:55:20 +02:00
fix: config use global variables electric boogaloo
This commit is contained in:
1 parent
d57d0a3b68
commit
12183f26e8
1 file changed
+10
-2
+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