File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -120,14 +120,15 @@ async def render(self, server: Server):
120120 self .add_field (name = 'Weather' , value = 'Dynamic\n **Clouds**\n n/a' )
121121
122122 visibility = weather ['visibility' ]['distance' ]
123- try :
124- ret = await server .send_to_dcs_sync ({
125- "command" : "getFog"
126- })
127- if ret ['visibility' ]:
128- visibility = int (ret ['visibility' ])
129- except (TimeoutError , asyncio .TimeoutError ):
130- pass
123+ if server .status == Status .RUNNING :
124+ try :
125+ ret = await server .send_to_dcs_sync ({
126+ "command" : "getFog"
127+ })
128+ if ret ['visibility' ]:
129+ visibility = int (ret ['visibility' ])
130+ except (TimeoutError , asyncio .TimeoutError ):
131+ pass
131132 value = "{:,} m / {:.2f} SM" .format (int (visibility ), visibility / const .METERS_IN_SM ) \
132133 if visibility < 30000 else "10 km / 6 SM (+)"
133134 value += ("\n \n **Wind**\n "
You can’t perform that action at this time.
0 commit comments