File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ custom:
1717# The `provider` block defines where your service will be deployed
1818provider :
1919 name : aws
20- runtime : python2 .7
20+ runtime : python3 .7
2121 stage : staging
2222 memorySize : 1024
2323 timeout : 30
Original file line number Diff line number Diff line change 11from rook .serverless import serverless_rook
2- import urllib , urllib2
2+ import urllib . request , urllib . parse , url
33import random
44import json
55
@@ -40,8 +40,8 @@ def get_random(min, max):
4040 "min" : "{}" .format (min ),
4141 "max" : "{}" .format (max )
4242 }
43- data = urllib .urlencode (values )
44- response = urllib2 .urlopen ("https://www.random.org/integers/?{values}" .format (values = data ))
43+ data = urllib .parse . urlencode (values )
44+ response = urllib . request .urlopen ("https://www.random.org/integers/?{values}" .format (values = data ))
4545 random = response .read ()
4646
4747 return int (random .strip ())
You can’t perform that action at this time.
0 commit comments