Skip to content

Commit 85d783a

Browse files
committed
fix(contrib): urlopen call hangs
The `urllib.urlopen(url)` call consistently hangs while `wget` and `curl` succeed to the same URL for retrieving the AMIs. Tested use of `urllib2` on Ubuntu Trusty (py 2.7.6) and CentOS 7 (py 2.7.5).
1 parent 0894a5f commit 85d783a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

contrib/aws/gen-json.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import argparse
33
import json
44
import os
5-
import urllib
5+
import urllib2
66
import yaml
77

88
parser = argparse.ArgumentParser()
@@ -12,7 +12,7 @@
1212

1313
url = "http://{channel}.release.core-os.net/amd64-usr/{version}/coreos_production_ami_all.json".format(**args)
1414
try:
15-
amis = json.load(urllib.urlopen(url))
15+
amis = json.load(urllib2.urlopen(url))
1616
except (IOError, ValueError):
1717
print "The URL {} is invalid.".format(url)
1818
raise

0 commit comments

Comments
 (0)