diff --git a/.config/i3pystatus/ice-status.py b/.config/i3pystatus/ice-status.py
index c4fab99..1f41417 100755
--- a/.config/i3pystatus/ice-status.py
+++ b/.config/i3pystatus/ice-status.py
@@ -66,12 +66,22 @@ try:
else:
next_stop = 'Endstation, bitte Aussteigen'
- print('{}km/h > {} (Net: {} > [{}] {})'.format(
+ net_current = ice_status['connectivity']['currentState']
+ net_future = ice_status['connectivity']['nextState']
+
+ if net_current not in (None, 'NO_INFO') or net_future not in (None, 'NO_INFO'):
+ net = ' (Net: {} > [{}] {})'.format(
+ net_current,
+ format_time(ice_status['connectivity']['remainingTimeSeconds']),
+ net_future,
+ )
+ else:
+ net = ''
+
+ print('{}km/h > {}{}'.format(
ice_status['speed'],
next_stop,
- ice_status['connectivity']['currentState'],
- format_time(ice_status['connectivity']['remainingTimeSeconds']),
- ice_status['connectivity']['nextState'],
+ net,
))
except Exception as e:
print(repr(e))