psi: change open calls in sea
Change-Id: I4fe235027df4ea935d84e29895eb280f620afbdf Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/34665 Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch> Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de> Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
This commit is contained in:
@ -86,7 +86,7 @@ else:
|
|||||||
def get_sea_port(instance):
|
def get_sea_port(instance):
|
||||||
for filename in ('sea_%s.tcl' % instance, 'sea.tcl'):
|
for filename in ('sea_%s.tcl' % instance, 'sea.tcl'):
|
||||||
try:
|
try:
|
||||||
with open(SEA_DIR / filename, encoding='utf-8') as f:
|
with (SEA_DIR / filename).open(encoding='utf-8') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
linesplit = line.split()
|
linesplit = line.split()
|
||||||
if len(linesplit) == 3:
|
if len(linesplit) == 3:
|
||||||
@ -484,7 +484,7 @@ class SeaModule(Module):
|
|||||||
cfgdict['description'] = '%s@%s%s' % (
|
cfgdict['description'] = '%s@%s%s' % (
|
||||||
name, json_file, '' if rel_paths == '.' else f' (rel_paths={rel_paths})')
|
name, json_file, '' if rel_paths == '.' else f' (rel_paths={rel_paths})')
|
||||||
|
|
||||||
with open(seaconfdir / json_file, encoding='utf-8') as fp:
|
with (seaconfdir / json_file).open(encoding='utf-8') as fp:
|
||||||
content = json.load(fp)
|
content = json.load(fp)
|
||||||
descr = content[sea_object]
|
descr = content[sea_object]
|
||||||
if rel_paths == '*' or not rel_paths:
|
if rel_paths == '*' or not rel_paths:
|
||||||
|
Reference in New Issue
Block a user