Browse Source

Reduce location name duplication

-If region and municipal are equal only one will be put
pull/2/head
Jack Sweeney 4 years ago committed by GitHub
parent
commit
2a49a94a1a
  1. 2
      planeClass.py

2
planeClass.py

@ -299,7 +299,7 @@ class Plane:
elif self.landed:
self.landed_time_msg = None
if has_coords:
message = (self.type_header + municipality + ", " + state + ", " + country_code + ".") + ((" " + self.landed_time_msg) if self.landed_time_msg != None else "")
message = (self.type_header + ((municipality + ", " + state) if municipality != state else state) + ", " + country_code + ".") + ((" " + self.landed_time_msg) if self.landed_time_msg != None else "")
else:
message = ("Landed" + ((" " + self.landed_time_msg) if self.landed_time_msg != None else "") if self.landed else "Tookoff" if self.tookoff else "")
print (message)

Loading…
Cancel
Save