Package list ctdconverter / ea3e6862-d60e-433d-9df0-7a1cb727cf6e/main debian / patches / upgrade_deprecated_strip
ea3e6862-d60e-433d-9df0-7a1cb727cf6e/main

Tree @ea3e6862-d60e-433d-9df0-7a1cb727cf6e/main (Download .tar.gz)

upgrade_deprecated_strip @ea3e6862-d60e-433d-9df0-7a1cb727cf6e/mainraw · history · blame

From: Michael R. Crusoe <michael.crusoe@gmail.com>
Subject: Upgrade deprecated using of string.strip()
Index: ctdconverter/common/utils.py
===================================================================
--- ctdconverter.orig/common/utils.py
+++ ctdconverter/common/utils.py
@@ -4,7 +4,6 @@ import ntpath
 import os
 
 from lxml import etree
-from string import strip
 from logger import info, error, warning
 
 from common.exceptions import ApplicationException
@@ -73,9 +72,9 @@ def validate_argument_is_valid_path(args
     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)