From d4a2ddc00ad6867af390f1ae696c455937d0d4f9 Mon Sep 17 00:00:00 2001
From: stedif <stefano.difrischia@inaf.it>
Date: Mon, 28 Feb 2022 13:02:53 +0100
Subject: [PATCH] L2SS-404: remove string None support

---
 .../tangostationcontrol/toolkit/archiver.py               | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tangostationcontrol/tangostationcontrol/toolkit/archiver.py b/tangostationcontrol/tangostationcontrol/toolkit/archiver.py
index f4bd05928..dcdd1940d 100644
--- a/tangostationcontrol/tangostationcontrol/toolkit/archiver.py
+++ b/tangostationcontrol/tangostationcontrol/toolkit/archiver.py
@@ -109,8 +109,8 @@ class Archiver():
         self.dev_polling_time = int(var_dict['development_polling_time'])
         abs_change = var_dict['development_archive_abs_change']
         rel_change = var_dict['development_archive_rel_change']
-        self.dev_archive_abs_change = None and int(abs_change)
-        self.dev_archive_rel_change = None and int(rel_change)
+        self.dev_archive_abs_change = abs_change and int(abs_change)
+        self.dev_archive_rel_change = rel_change and int(rel_change)
         self.dev_archive_period = int(var_dict['development_archive_period']) 
         self.dev_event_period = int(var_dict['development_event_period'])
         self.dev_strategy = var_dict['development_strategy']
@@ -192,8 +192,8 @@ class Archiver():
             self.cm.write_attribute('SetStrategy', strategy)
             self.cm.write_attribute('SetPollingPeriod', polling_period)
             self.cm.write_attribute('SetPeriodEvent', event_period)
-            if not(abs_change is None or abs_change=="None"): self.cm.write_attribute('SetAbsoluteEvent', abs_change)
-            if not(rel_change is None or rel_change=="None"): self.cm.write_attribute('SetRelativeEvent', rel_change)
+            if abs_change is not None: self.cm.write_attribute('SetAbsoluteEvent', abs_change)
+            if rel_change is not None: self.cm.write_attribute('SetRelativeEvent', rel_change)
             self.cm.AttributeAdd()
             logger.info(f"Attribute {attribute_name} added to archiving list!")
         except DevFailed as e:
-- 
GitLab