diff mbox series

[05/14] helpers/sysfs: fix NameError

Message ID 20230313094431.507952-6-tzungbi@kernel.org (mailing list archive)
State Handled Elsewhere
Headers show
Series cros-ec-tests: fix some exceptions and clean-ups | expand

Commit Message

Tzung-Bi Shih March 13, 2023, 9:44 a.m. UTC
Some errors have been revealed after the runner is-a TextTestRunner.

Fix the following error:
> NameError: name 'self' is not defined

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
---
 cros/helpers/sysfs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/cros/helpers/sysfs.py b/cros/helpers/sysfs.py
index f3abfabced24..1ccc0cd2ba24 100755
--- a/cros/helpers/sysfs.py
+++ b/cros/helpers/sysfs.py
@@ -33,6 +33,6 @@  def sysfs_check_attributes_exists(s, path, name, files, check_devtype):
             for filename in files:
                 s.assertEqual(os.path.exists(path + "/" + devname + "/" + filename), 1)
     except IOError as e:
-            self.skipTest("Exception occured: {0}, skipping".format(e.strerror))
+            s.skipTest("Exception occured: {0}, skipping".format(e.strerror))
     if match == 0:
         s.skipTest("No " + name + " found, skipping")