summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2017-04-19 08:50:06 +0200
committerChristian Heimes <cheimes@redhat.com>2017-04-24 12:15:30 +0200
commitfcbabc0ce929d91f63098bba4867d102ac04ead0 (patch)
treedd676b467650eb991a7876e9c896be73c219f91f /base
parentba32351d7c362e6b0e313cde0929c56f3f55ec5f (diff)
downloadpki-fcbabc0ce929d91f63098bba4867d102ac04ead0.tar.gz
pki-fcbabc0ce929d91f63098bba4867d102ac04ead0.tar.xz
pki-fcbabc0ce929d91f63098bba4867d102ac04ead0.zip
Python 3 support and Travis testing
Fix Python 3 support for pkispawn: Config values are text values. Therefore the config file has to be written as text file. Test Python 3 support in Travis CI. The little script py3rewrite copies pki.server Python files and rewrites pkispawn and pkidestroy to use Python 3. Change-Id: Ia516f80df94cacc2acfa70929ad16bb5b9c39ddf Signed-off-by: Christian Heimes <cheimes@redhat.com>
Diffstat (limited to 'base')
-rw-r--r--base/server/python/pki/server/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/server/python/pki/server/__init__.py b/base/server/python/pki/server/__init__.py
index 88986548d..46c6711ed 100644
--- a/base/server/python/pki/server/__init__.py
+++ b/base/server/python/pki/server/__init__.py
@@ -296,9 +296,9 @@ class PKISubsystem(object):
def save(self):
sorted_config = sorted(self.config.items(), key=operator.itemgetter(0))
- with io.open(self.cs_conf, 'wb') as f:
+ with io.open(self.cs_conf, 'w') as f:
for (key, value) in sorted_config:
- f.write('%s=%s\n' % (key, value))
+ f.write(u'%s=%s\n' % (key, value))
def is_valid(self):
return os.path.exists(self.conf_dir)