Minute instead month in backup file name
[EVA-2020-02-2.git] / examples / all-in-one.py
index 6dda60779f2f354c7500e9d06e8ab8d6b1fbdba3..f7933a9e78b9f7603b642e2cad07b0d67e27f945 100755 (executable)
@@ -198,7 +198,7 @@ try:
             try:
                 data = pms5003.read()
             except pmsReadTimeoutError:
             try:
                 data = pms5003.read()
             except pmsReadTimeoutError:
-                logging.warn("Failed to read PMS5003")
+                logging.warning("Failed to read PMS5003")
             else:
                 data = float(data.pm_ug_per_m3(1.0))
                 display_text(variables[mode], data, unit)
             else:
                 data = float(data.pm_ug_per_m3(1.0))
                 display_text(variables[mode], data, unit)
@@ -209,7 +209,7 @@ try:
             try:
                 data = pms5003.read()
             except pmsReadTimeoutError:
             try:
                 data = pms5003.read()
             except pmsReadTimeoutError:
-                logging.warn("Failed to read PMS5003")
+                logging.warning("Failed to read PMS5003")
             else:
                 data = float(data.pm_ug_per_m3(2.5))
                 display_text(variables[mode], data, unit)
             else:
                 data = float(data.pm_ug_per_m3(2.5))
                 display_text(variables[mode], data, unit)
@@ -220,7 +220,7 @@ try:
             try:
                 data = pms5003.read()
             except pmsReadTimeoutError:
             try:
                 data = pms5003.read()
             except pmsReadTimeoutError:
-                logging.warn("Failed to read PMS5003")
+                logging.warning("Failed to read PMS5003")
             else:
                 data = float(data.pm_ug_per_m3(10))
                 display_text(variables[mode], data, unit)
             else:
                 data = float(data.pm_ug_per_m3(10))
                 display_text(variables[mode], data, unit)