Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375740 )

Change subject: Don't try to sanitize logs if no password is given
......................................................................

Don't try to sanitize logs if no password is given

Change-Id: I127ee886389599db35ca87f600ceef2923b831f9
---
M upgrade.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/libraryupgrader 
refs/changes/40/375740/1

diff --git a/upgrade.py b/upgrade.py
index d5c1e62..c8b8a40 100755
--- a/upgrade.py
+++ b/upgrade.py
@@ -80,7 +80,8 @@
 def get_safe_logs(name: str, pw: str) -> str:
     logs = docker.logs(name)
     # Prevent the password from accidentally leaking
-    logs = logs.replace(pw, '<password>')
+    if pw:
+        logs = logs.replace(pw, '<password>')
 
     return logs
 

-- 
To view, visit https://gerrit.wikimedia.org/r/375740
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I127ee886389599db35ca87f600ceef2923b831f9
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to