Package list ctdconverter / debian/2.0-2 debian / patches / upgrade_deprecated_strip
debian/2.0-2

Tree @debian/2.0-2 (Download .tar.gz)

upgrade_deprecated_strip @debian/2.0-2raw · history · blame

From: Michael R. Crusoe <michael.crusoe@gmail.com>
Subject: Upgrade deprecated using of string.strip()
--- ctdconverter.orig/common/utils.py
+++ ctdconverter/common/utils.py
@@ -4,8 +4,7 @@
 import os
 
 from lxml import etree
-from string import strip
-from logger import info, error, warning
+from logger import info, error, warning
 
 from common.exceptions import ApplicationException
 from CTDopts.CTDopts import CTDModel, ParameterGroup
@@ -73,9 +72,9 @@
     if member_value is not None:
         if isinstance(member_value, list):
             for file_name in member_value:
-                paths_to_check.append(strip(str(file_name)))
+                paths_to_check.append(str(file_name).strip())
         else:
-            paths_to_check.append(strip(str(member_value)))
+            paths_to_check.append(str(member_value).strip())
 
         for path_to_check in paths_to_check:
             validate_path_exists(path_to_check)