From c65903cf7e2686d7b20eccddab160c6e1800acff Mon Sep 17 00:00:00 2001 From: Inessa Vasilevskaya Date: Wed, 13 Dec 2023 14:30:25 +0100 Subject: [PATCH] Changes after pstodulk's review - Use os.path.basename to check that dealing with actor file --- .../libraries/scancustommodifications.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/system_upgrade/common/actors/scancustommodifications/libraries/scancustommodifications.py b/repos/system_upgrade/common/actors/scancustommodifications/libraries/scancustommodifications.py index 62c6012019..a34eb5d3c0 100644 --- a/repos/system_upgrade/common/actors/scancustommodifications/libraries/scancustommodifications.py +++ b/repos/system_upgrade/common/actors/scancustommodifications/libraries/scancustommodifications.py @@ -42,7 +42,7 @@ def deduce_actor_name(a_file): # NOTE(ivasilev) Actors reside only in actor.py files, so AST processing any other file can be skipped. # In case this function has been called on a non-actor file, let's go straight to recursive call on the assumed # location of the actor file. - if a_file.endswith('actor.py'): + if os.path.basename(a_file) == 'actor.py': data = None with open(a_file) as f: try: