From 6284ecc09d65bef09eba4a8b645154c46f4127a7 Mon Sep 17 00:00:00 2001 From: Ion Buzdugan Date: Thu, 29 Jun 2023 22:34:17 -0700 Subject: [PATCH] Update flight.py to include comma parsing for CO2 emissions Just like for price parsing, CO2 emission entries also need to account for commas when converting them to int --- src/google_flight_analysis/flight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google_flight_analysis/flight.py b/src/google_flight_analysis/flight.py index a7e0373..4995f16 100644 --- a/src/google_flight_analysis/flight.py +++ b/src/google_flight_analysis/flight.py @@ -124,7 +124,7 @@ def _classify_arg(self, arg): elif arg.endswith('CO2') and self._co2 is None: # co2 - self._co2 = int(arg.split()[0]) + self._co2 = int(arg.split()[0].replace(',','')) elif arg.endswith('emissions') and self._emissions is None: # emmision emission_val = arg.split()[0]