Skip to content

Commit cb8a5cc

Browse files
authored
Fix the use before assignment
Fixes an issue when the environment is being taken down, and the exception occurs due to a variable being used before assignment.
1 parent 60e3290 commit cb8a5cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

RLTest/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,10 @@ def takeEnvDown(self, fullShutDown=False):
605605
env=self.currEnv)
606606

607607
if needShutdown:
608+
flush_ok = True
608609
if self.currEnv.isUp():
609610
try:
610611
self.currEnv.flush()
611-
flush_ok = True
612612
except:
613613
flush_ok = False
614614
self.currEnv.stop()

0 commit comments

Comments
 (0)