depot/third_party/nixpkgs/pkgs/applications/networking/pyload-ng/declarative-default-user.patch
Default email 60f07311b9 Project import generated by Copybara.
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
2024-02-06 17:22:34 -08:00

15 lines
612 B
Diff

diff --git a/src/pyload/core/__init__.py b/src/pyload/core/__init__.py
index 4324fc700..f7fcd66ec 100644
--- a/src/pyload/core/__init__.py
+++ b/src/pyload/core/__init__.py
@@ -46,8 +46,8 @@ class Exit(Exception):
# improve external scripts
class Core:
LOCALE_DOMAIN = APPID
- DEFAULT_USERNAME = APPID
- DEFAULT_PASSWORD = APPID
+ DEFAULT_USERNAME = os.getenv("PYLOAD_DEFAULT_USERNAME", APPID)
+ DEFAULT_PASSWORD = os.getenv("PYLOAD_DEFAULT_PASSWORD", APPID)
DEFAULT_DATADIR = os.path.join(
os.getenv("APPDATA") or USERHOMEDIR, "pyLoad" if os.name == "nt" else ".pyload"
)