Skip to content

Commit 117c90b

Browse files
Make script compatible with python 3
1 parent 085ff22 commit 117c90b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

org-toggl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55
import json
66
from datetime import datetime, timedelta
7-
from ConfigParser import ConfigParser
7+
from configparser import ConfigParser
88
import logging
99
import urllib
1010

@@ -279,7 +279,7 @@ def post(self, url, payload):
279279
def get(self, url, params):
280280
headers = {'content-type': 'application/json'}
281281
auth = (self.api_token, 'api_token')
282-
url = url + '?' + urllib.urlencode(params)
282+
url = url + '?' + urllib.parse.urlencode(params)
283283
LOG.debug('Sending GET request: %s', url)
284284
r = requests.get(url, headers=headers, auth=auth)
285285
resp_data = r.json()

0 commit comments

Comments
 (0)