Skip to content

Commit a256b86

Browse files
author
cassiope
committed
KCore: notifyCassiopee: minor
1 parent a4ecf38 commit a256b86

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

Cassiopee/KCore/test/notifyCassiopee.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@ def checkCheckoutStatus(sendEmail=False):
375375
# Check valid status
376376
def checkValidStatus(sessionSuffix=""):
377377
log_entries = []
378-
if sessionSuffix: sessionSuffix = "_" + sessionSuffix
379-
logAllValids = f'/stck/cassiope/git/logs/validation_status{sessionSuffix}.txt'
378+
sessionSuffixMod = "_" + sessionSuffix if sessionSuffix else sessionSuffix
379+
logAllValids = f'/stck/cassiope/git/logs/validation_status{sessionSuffixMod}.txt'
380380
if os.access(logAllValids, os.R_OK):
381381
with open(logAllValids, 'r') as f:
382382
for line in f:
@@ -391,9 +391,10 @@ def checkValidStatus(sessionSuffix=""):
391391
gitOrigin = Dist.getGitOrigin(cassiopeeIncDir)
392392
gitInfo = "Git origin: {}".format(gitOrigin)
393393

394+
if not sessionSuffix: sessionSuffix = "Cassiopee"
394395
vnvState = 'OK'
395-
messageText = "Non-regression testing of Cassiopee and all "\
396-
"PModules:\n{}\n\n{}\n\n".format(52*'-', gitInfo)
396+
messageText = "Non-regression testing of {}:\n{}\n\n{}\n\n".format(
397+
sessionSuffix, 52*'-', gitInfo)
397398
messageText += '{:^22} | {:^6} | {:^7} | {:^24} | {:^10}\n{}\n'.format(
398399
"PROD.", "BRANCH", "HASH", "DATE", "STATUS", 83*'-')
399400
for log_machine in log_entries:
@@ -407,7 +408,7 @@ def checkValidStatus(sessionSuffix=""):
407408
prod, gitBranch, gitHash, date, status)
408409
if 'FAILED' in log_machine: vnvState = 'FAILED'
409410

410-
messageSubject = "[V&V Cassiopee] State: {}".format(vnvState)
411+
messageSubject = f"[V&V {sessionSuffix}] State: {vnvState}"
411412
if vnvState == 'FAILED':
412413
messageText += '\n\nIf the prod. you wish to use is marked as FAILED, '\
413414
'please contact the maintainers:\nchristophe.benoit@onera.fr, '\

0 commit comments

Comments
 (0)