aboutsummaryrefslogtreecommitdiff
path: root/tools/test-trips.py
diff options
context:
space:
mode:
authorcasswarry0 <casswarry0@gmail.com>2023-01-17 17:14:53 -0700
committercasswarry0 <casswarry0@gmail.com>2023-01-17 17:14:53 -0700
commit7338b8730949ed027b3f8b31d7dca20687ebbb8b (patch)
treec2d171e6121818ab511460a786f69aab97a2a628 /tools/test-trips.py
parentcdecd3fa4427a382c0b09f8ad9d69ec14388960a (diff)
parent85501f9cf4918d5eee345f83aed7a31eecb26b8d (diff)
downloadtrackermap-server-7338b8730949ed027b3f8b31d7dca20687ebbb8b.tar.gz
trackermap-server-7338b8730949ed027b3f8b31d7dca20687ebbb8b.tar.bz2
trackermap-server-7338b8730949ed027b3f8b31d7dca20687ebbb8b.zip
Merge branch 'master' into develop
Diffstat (limited to 'tools/test-trips.py')
-rwxr-xr-xtools/test-trips.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/test-trips.py b/tools/test-trips.py
index a71357fdb..3c994fd83 100755
--- a/tools/test-trips.py
+++ b/tools/test-trips.py
@@ -1,7 +1,7 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
import urllib
-import httplib
+import http.client as httplib
import time
import datetime
@@ -25,7 +25,7 @@ points = [
def send(conn, time, lat, lon, speed):
params = (('id', id), ('timestamp', int(time)), ('lat', lat), ('lon', lon), ('speed', speed))
- conn.request('POST', '?' + urllib.urlencode(params))
+ conn.request('POST', '?' + urllib.parse.urlencode(params))
conn.getresponse().read()
conn = httplib.HTTPConnection(server)