summaryrefslogtreecommitdiffstats
path: root/src/service-dbus
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2013-10-23 09:14:55 +0200
committerJan Safranek <jsafrane@redhat.com>2013-10-23 09:14:55 +0200
commit54fe469b823273700b19c35179032c0ec11f36db (patch)
treec92e54a7cd4a244b12fe7b69fd0937f55d89c5a1 /src/service-dbus
parent23e1eeb81fbcb0514c5e84816195e5092c5ff08a (diff)
downloadopenlmi-providers-54fe469b823273700b19c35179032c0ec11f36db.tar.gz
openlmi-providers-54fe469b823273700b19c35179032c0ec11f36db.tar.xz
openlmi-providers-54fe469b823273700b19c35179032c0ec11f36db.zip
service: fix test_service_race_condition
failing.service was removed twice without checking.
Diffstat (limited to 'src/service-dbus')
-rw-r--r--src/service-dbus/test/testService.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/service-dbus/test/testService.py b/src/service-dbus/test/testService.py
index d06e3da..6c28df4 100644
--- a/src/service-dbus/test/testService.py
+++ b/src/service-dbus/test/testService.py
@@ -468,7 +468,11 @@ class TestServiceProviderFailingService(unittest.TestCase):
subprocess.call ("systemctl daemon-reload".split())
def tearDown(self):
- os.unlink ("/etc/systemd/system/failing.service")
+ try:
+ os.unlink ("/etc/systemd/system/failing.service")
+ except OSError:
+ # failing.service may be removed by test_service_race_condition
+ pass
subprocess.call ("systemctl daemon-reload".split())
def test_failing_service_start_stop(self):