[project @ Finished statement + additional error message]
[htsworkflow.git] / bin / retrieve_eland_config.py
index 7cb116bb66d7be5f5d104f1b774d9b7000e6db73..3b337b058926d3c3f4bfbf4aa95bb070c4a745d9 100644 (file)
@@ -113,15 +113,20 @@ def saveConfigFile(flowcell, base_host_url, output_filepath):
     web = urllib.urlopen(url)
   except IOError, msg:
     if str(msg).find("Connection refused") >= 0:
-      print 'Error: Could not connect to: %s' % (url)
+      print 'Error: Connection refused for: %s' % (url)
       f.close()
       sys.exit(1)
+    elif str(msg).find("Name or service not known") >= 0:
+      print 'Error: Invalid domain or ip address for: %s' % (url)
+      f.close()
+      sys.exit(2)
     else:
       raise IOError, msg
     
   f.write(web.read())
   web.close()
   f.close()
+  print 'Wrote config file to %s' % (output_filepath)
 
 if __name__ == '__main__':
   #Display help if no args are presented