Skip to content

Commit db87083

Browse files
committed
Fix possible use-before-assign bug
1 parent a97e6c9 commit db87083

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pbench/server/cache_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ def make_cache_object(dir_path: Path, path: Path) -> CacheObject:
150150

151151
if path.is_symlink():
152152
ftype = CacheType.SYMLINK
153+
link_path = path.readlink()
153154
try:
154-
link_path = path.readlink()
155155
if link_path.is_absolute():
156156
raise ValueError("symlink path is absolute")
157157
r_path = path.resolve(strict=True)

0 commit comments

Comments
 (0)