void-packages/srcpkgs/opendkim/patches/python3.diff

35 lines
1.2 KiB
Diff

--- a/contrib/repute/repute.py 2023-08-27 07:36:35.000000000 +0100
+++ b/contrib/repute/repute.py 2023-10-06 20:30:28.370530279 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# sudo yum-builddep MySQL-python / sudo apt-get build-dep python-mysqldb
# Prereq:
@@ -17,7 +17,6 @@
from saratoga.outputFormats import OutputRegistry
from twisted.enterprise import adbapi
from twisted.internet import defer
-import itertools
import json
class DKIM(object):
@@ -80,7 +79,7 @@
rows = yield self.cp.runQuery(query, {'domain': domain, 'reporter': reporter})
if len(rows) > 0:
- ret = dict(itertools.izip(fields, rows[0]))
+ ret = dict(zip(fields, rows[0]))
else:
ret = 0
defer.returnValue(ret)
@@ -104,7 +103,7 @@
rows = yield self.cp.runQuery(query, { 'reporter' : reporter } )
if len(rows) > 0:
- ret = dict(itertools.izip(fields, rows[0]))
+ ret = dict(zip(fields, rows[0]))
request.setHeader('Last-modified', rows[0][3].strftime("%A, %d, %B %Y %H:%M GMT"))
else:
ret = False