HttpRequest.getcode doesn't exist in python 2.4, use .code instead
[htsworkflow.git] / htsworkflow / pipelines / retrieve_config.py
index 9d77c3579a36351a5e58f4b30604860c3e075ce0..3b6ba3e21f331f5ceade12cd40349831131d6653 100644 (file)
@@ -49,12 +49,12 @@ def retrieve_flowcell_info(base_host_url, flowcell):
     
     contents = web.read()
     headers = web.info()
-    
-    if web.getcode() == 403:
+   
+    if web.code == 403:
         msg = "403 - Forbbidden, probably need api key"
         raise FlowCellNotFound(msg)
     
-    if web.getcode() == 404:
+    if web.code == 404:
         msg = "404 - Not Found: Flowcell (%s); base_host_url (%s);\n full url(%s)\n " \
               "Did you get right port #?" % (flowcell, base_host_url, url)
         raise FlowCellNotFound(msg)