dmart 1.4.40.post4__py3-none-any.whl → 1.4.40.post5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dmart/set_admin_passwd.py +22 -0
- {dmart-1.4.40.post4.dist-info → dmart-1.4.40.post5.dist-info}/METADATA +1 -1
- {dmart-1.4.40.post4.dist-info → dmart-1.4.40.post5.dist-info}/RECORD +6 -6
- {dmart-1.4.40.post4.dist-info → dmart-1.4.40.post5.dist-info}/WHEEL +0 -0
- {dmart-1.4.40.post4.dist-info → dmart-1.4.40.post5.dist-info}/entry_points.txt +0 -0
- {dmart-1.4.40.post4.dist-info → dmart-1.4.40.post5.dist-info}/top_level.txt +0 -0
dmart/set_admin_passwd.py
CHANGED
|
@@ -61,4 +61,26 @@ if login_creds_sample.exists():
|
|
|
61
61
|
login_creds_path = home_dmart / "login_creds.sh"
|
|
62
62
|
with open(login_creds_path, 'w') as creds:
|
|
63
63
|
subprocess.run( [ "sed", f"s/xxxx/{password}/g", str(login_creds_sample) ], stdout=creds)
|
|
64
|
+
|
|
65
|
+
# Update cli.ini if it exists
|
|
66
|
+
cli_ini_path = home_dmart / "cli.ini"
|
|
67
|
+
if cli_ini_path.exists():
|
|
68
|
+
try:
|
|
69
|
+
with open(cli_ini_path, 'r') as f:
|
|
70
|
+
content = f.read()
|
|
71
|
+
|
|
72
|
+
# Replace password for dmart user
|
|
73
|
+
# Assuming the format is password = "..."
|
|
74
|
+
# We need to be careful not to replace other passwords if any, but cli.ini usually has one
|
|
75
|
+
# Or we can look for specific pattern if we know the structure
|
|
76
|
+
|
|
77
|
+
# A simple regex replacement for password = "..."
|
|
78
|
+
new_content = re.sub(r'password\s*=\s*".*"', f'password = "{password}"', content)
|
|
79
|
+
|
|
80
|
+
with open(cli_ini_path, 'w') as f:
|
|
81
|
+
f.write(new_content)
|
|
82
|
+
print(f"Updated password in {cli_ini_path}")
|
|
83
|
+
except Exception as e:
|
|
84
|
+
print(f"Warning: Failed to update cli.ini: {e}")
|
|
85
|
+
|
|
64
86
|
print("Done")
|
|
@@ -27,7 +27,7 @@ dmart/run_notification_campaign.py,sha256=ZCvHfaimK4W6q4XuHs2r6wavMGipYYw4aUkNlx
|
|
|
27
27
|
dmart/scheduled_notification_handler.py,sha256=m26TryqHuvXR5PUPvzY9nFnpJpfbsuRjc_Q6wHdxvE8,4643
|
|
28
28
|
dmart/schema_migration.py,sha256=a1w3c-fSm95MVWFzobgy0AxIbhbzMDSfD46easTmwKE,6132
|
|
29
29
|
dmart/schema_modulate.py,sha256=vB7NxvqghqNpFe__p0ll03WsvNftzxBbQ6UXB2UfxNU,6454
|
|
30
|
-
dmart/set_admin_passwd.py,sha256=
|
|
30
|
+
dmart/set_admin_passwd.py,sha256=hYwy6wtd35CcJEo59T3fPwxiSVuW_Xd1-2b0ZcTzD3Q,3228
|
|
31
31
|
dmart/sync.py,sha256=FlmubtlnFaxtZkbRV1-eyS_Sx5KBRvWyIZjvd0Tiar4,7339
|
|
32
32
|
dmart/test_utils.py,sha256=5DAS0PzPkkLYDZY-zMraz6blb97rH8qcGT_bwktKtpQ,1188
|
|
33
33
|
dmart/websocket.py,sha256=Q8WUTvOTBHKP5xy5wim8yn0t-BfjrPwx7J_6vbzAm1A,7576
|
|
@@ -280,8 +280,8 @@ dmart/utils/ticket_sys_utils.py,sha256=9QAlW2iiy8KyxQRBDj_WmzS5kKb0aYJmGwd4qzmGV
|
|
|
280
280
|
dmart/utils/web_notifier.py,sha256=QM87VVid2grC5lK3NdS1yzz0z1wXljr4GChJOeK86W4,843
|
|
281
281
|
dmart/utils/templates/activation.html.j2,sha256=XAMKCdoqONoc4ZQucD0yV-Pg5DlHHASZrTVItNS-iBE,640
|
|
282
282
|
dmart/utils/templates/reminder.html.j2,sha256=aoS8bTs56q4hjAZKsb0jV9c-PIURBELuBOpT_qPZNVU,639
|
|
283
|
-
dmart-1.4.40.
|
|
284
|
-
dmart-1.4.40.
|
|
285
|
-
dmart-1.4.40.
|
|
286
|
-
dmart-1.4.40.
|
|
287
|
-
dmart-1.4.40.
|
|
283
|
+
dmart-1.4.40.post5.dist-info/METADATA,sha256=PMl2sUI_Oo0OBSz57NOeR4PGjBSQhrRBtD1EAeK1HAU,2531
|
|
284
|
+
dmart-1.4.40.post5.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
285
|
+
dmart-1.4.40.post5.dist-info/entry_points.txt,sha256=N832M4wG8d2GDw1xztKRVM3TnxpY2QDzvdFE8XaWaG8,43
|
|
286
|
+
dmart-1.4.40.post5.dist-info/top_level.txt,sha256=zJo4qk9fUW0BGIR9f4DCfpxaXbvQXH9izIOom6JsyAo,6
|
|
287
|
+
dmart-1.4.40.post5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|