diff get_sequences.py @ 6:7af66c2b3831 draft default tip

"planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/Ensembl-REST commit 17c65045b726d0695814bfe761e534f6521786f1"
author earlhaminst
date Tue, 20 Oct 2020 15:07:23 +0000
parents 0fa1d1cc417d
children
line wrap: on
line diff
--- a/get_sequences.py	Thu Oct 31 07:50:07 2019 -0400
+++ b/get_sequences.py	Tue Oct 20 15:07:23 2020 +0000
@@ -23,7 +23,7 @@
 if options.input is None:
     raise Exception('-i option must be specified')
 
-server = 'http://rest.ensembl.org'
+server = 'https://rest.ensembl.org'
 ext = 'sequence/id'
 
 headers = {'Content-Type': 'text/x-fasta', 'Accept': 'text/x-fasta'}
@@ -36,7 +36,7 @@
             break
         data = {'ids': ids}
         r = requests.post(urljoin(server, ext), params=params, headers=headers,
-                          data=json.dumps(data))
+                          data=json.dumps(data), allow_redirects=False)
 
         if not r.ok:
             r.raise_for_status()