File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 1
- import os
2
- import sys
3
1
'''
4
2
##############################################################################
5
3
# Copyright 2023 IBM Corp.
22
20
@author: HWASSMAN
23
21
'''
24
22
23
+ import os
25
24
import time
26
25
from bridgeLogger import getBridgeLogger
27
26
from messages import MSG
@@ -72,20 +71,20 @@ def watch(self):
72
71
""" Function to keep watching in a loop """
73
72
self .running = True
74
73
self .logger .debug (MSG ['StartWatchingFiles' ].format (self .paths ))
75
- while self .running :
76
- try :
74
+ while self .running :
75
+ try :
77
76
# Look for changes
78
77
time .sleep (self .refresh_delay_secs )
79
- self .update_files_list ()
80
- self .look ()
81
- except KeyboardInterrupt :
78
+ self .update_files_list ()
79
+ self .look ()
80
+ except KeyboardInterrupt :
82
81
self .logger .details (MSG ['StopWatchingFiles' ].format (self .paths ))
83
- break
82
+ break
84
83
except FileNotFoundError as e :
85
84
# Action on file not found
86
85
self .logger .warning (MSG ['FileNotFound' ].format (e .filename ))
87
86
pass
88
- except Exception as e :
87
+ except Exception as e :
89
88
self .logger .warning (MSG ['StopWatchingFiles' ].format (self .paths ))
90
89
self .logger .details (MSG ['UnhandledError' ].format (type (e ).__name__ ))
91
90
break
Original file line number Diff line number Diff line change 2
2
import time
3
3
from source .watcher import ConfigWatcher
4
4
from source .bridgeLogger import configureLogging
5
- from nose2 .tools .such import helper as assert_helper
6
5
from nose2 .tools .decorators import with_setup
7
6
from threading import Thread
8
7
You can’t perform that action at this time.
0 commit comments