From e1458471a8e090d7fa15551725efe4d46a1a0ca8 Mon Sep 17 00:00:00 2001 From: Alexander Zaft Date: Thu, 19 Sep 2024 15:31:13 +0200 Subject: [PATCH] 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 Reviewed-by: Alexander Zaft Tested-by: Jenkins Automated Tests --- frappy_psi/sea.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappy_psi/sea.py b/frappy_psi/sea.py index fb330bfc..32bd4a12 100644 --- a/frappy_psi/sea.py +++ b/frappy_psi/sea.py @@ -86,7 +86,7 @@ else: def get_sea_port(instance): for filename in ('sea_%s.tcl' % instance, 'sea.tcl'): 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: linesplit = line.split() if len(linesplit) == 3: @@ -484,7 +484,7 @@ class SeaModule(Module): cfgdict['description'] = '%s@%s%s' % ( 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) descr = content[sea_object] if rel_paths == '*' or not rel_paths: