convert has_key to X in dictionary
[htsworkflow.git] / htsworkflow / pipelines / ipar.py
index 52dda0889c9b8cfc5aea23c6423e32beb2f9e1fa..8719a060cd9d1ef67a2abf0cc33e7055d4924e53 100644 (file)
@@ -210,7 +210,7 @@ def load_ipar_param_tree(paramfile):
 
     tree = ElementTree.parse(paramfile).getroot()
     run = tree.find('Run')
-    if run.attrib.has_key('Name') and run.attrib['Name'] in SOFTWARE_NAMES:
+    if run.attrib.get('Name', None) in SOFTWARE_NAMES:
         return run
     else:
         LOGGER.info("No run found")