diff --git a/src/redmine_ticket/redmine_issue_downloader.py b/src/redmine_ticket/redmine_issue_downloader.py index 4446d94..3fe8fa1 100644 --- a/src/redmine_ticket/redmine_issue_downloader.py +++ b/src/redmine_ticket/redmine_issue_downloader.py @@ -105,7 +105,7 @@ def get_issue_count(self): msg('Data from request (as text): %s' % r.text) raise Exception('Failed to convert issue count data to JSON.\nUrl: %s\nAuth:%s" % (url, auth)') - if not data.has_key('total_count'): + if 'total_count' not in data: msgx('Total count not found in data: \n[%s]' % data) return data['total_count'] @@ -166,7 +166,7 @@ def download_tickets2(self): RECORD_RETRIEVAL_SIZE = 100 - num_loops = ticket_cnt / RECORD_RETRIEVAL_SIZE + num_loops = ticket_cnt // RECORD_RETRIEVAL_SIZE extra_recs = ticket_cnt % RECORD_RETRIEVAL_SIZE if extra_recs > 0: num_loops+=1