summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/core/decorator/oetimeout.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/core/decorator/oetimeout.py')
-rw-r--r--meta/lib/oeqa/core/decorator/oetimeout.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/lib/oeqa/core/decorator/oetimeout.py b/meta/lib/oeqa/core/decorator/oetimeout.py
index a247583f7f..5e6873ad48 100644
--- a/meta/lib/oeqa/core/decorator/oetimeout.py
+++ b/meta/lib/oeqa/core/decorator/oetimeout.py
@@ -1,5 +1,8 @@
+#
# Copyright (C) 2016 Intel Corporation
-# Released under the MIT license (see COPYING.MIT)
+#
+# SPDX-License-Identifier: MIT
+#
import signal
from . import OETestDecorator, registerDecorator
@@ -21,5 +24,6 @@ class OETimeout(OETestDecorator):
def tearDownDecorator(self):
signal.alarm(0)
- signal.signal(signal.SIGALRM, self.alarmSignal)
- self.logger.debug("Removed SIGALRM handler")
+ if hasattr(self, 'alarmSignal'):
+ signal.signal(signal.SIGALRM, self.alarmSignal)
+ self.logger.debug("Removed SIGALRM handler")