Skip to content

Commit 4c4b2da

Browse files
authored
Merge pull request #8 from Rookout/upgrade-python3
Upgrade to python3.8
2 parents f03a6c6 + 916c2d6 commit 4c4b2da

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

serverless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ custom:
1717
# The `provider` block defines where your service will be deployed
1818
provider:
1919
name: aws
20-
runtime: python2.7
20+
runtime: python3.7
2121
stage: staging
2222
memorySize: 1024
2323
timeout: 30

task_generator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from rook.serverless import serverless_rook
2-
import urllib, urllib2
2+
import urllib.request, urllib.parse, url
33
import random
44
import 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())

0 commit comments

Comments
 (0)