@@ -43,11 +43,12 @@ def _do_i_print_last_char(self, first_print):
43
43
return first_print
44
44
45
45
def write (self , msg = None , suffix = None , counter = None , help_msg = False , error_msg = False , notify_function = None ):
46
- if self .asked_to_stop :
47
- self .counter = None
48
- return
49
46
if self .cursesScreen :
50
47
with self .lock :
48
+ if self .asked_to_stop :
49
+ self .asked_to_stop = False
50
+ self .counter = None
51
+ return
51
52
#if logger.isEnabledFor(logging.DEBUG):
52
53
# logger.debug('before ----------------------------')
53
54
# logger.debug('msg = "{}"'.format(msg))
@@ -73,6 +74,7 @@ def write(self, msg=None, suffix=None, counter=None, help_msg=False, error_msg=F
73
74
# logger.debug('self.counter = "{}"'.format(self.counter))
74
75
75
76
if self .asked_to_stop :
77
+ self .asked_to_stop = False
76
78
self .counter = None
77
79
return
78
80
""" update main message """
@@ -97,6 +99,7 @@ def write(self, msg=None, suffix=None, counter=None, help_msg=False, error_msg=F
97
99
self ._active_width = self .width
98
100
99
101
if self .asked_to_stop :
102
+ self .asked_to_stop = False
100
103
self .counter = None
101
104
return
102
105
""" display suffix """
@@ -127,6 +130,7 @@ def write(self, msg=None, suffix=None, counter=None, help_msg=False, error_msg=F
127
130
logger .debug ('Counter: {}' .format (self .counter ))
128
131
129
132
if self .asked_to_stop :
133
+ self .asked_to_stop = False
130
134
self .counter = None
131
135
return
132
136
""" display press ? """
@@ -144,6 +148,7 @@ def write(self, msg=None, suffix=None, counter=None, help_msg=False, error_msg=F
144
148
logger .debug ('Press ? for help: no' )
145
149
146
150
if self .asked_to_stop :
151
+ self .asked_to_stop = False
147
152
self .counter = None
148
153
return
149
154
self .cursesScreen .refresh ()
0 commit comments