Browse Source

Fix Python 3 compatibility issues.

Fix two issues with Python 3:
* Use class annotations to denote an implementation of a
  Zope interface;
* A classical byte/str issue.
master
parent
commit
de3d3c12a0
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      incenp/certbot/ssh.py

+ 3
- 3
incenp/certbot/ssh.py View File

@ -13,6 +13,8 @@ from subprocess import Popen, PIPE
logger = logging.getLogger(__name__)
@zope.interface.implementer(interfaces.IAuthenticator)
@zope.interface.provider(interfaces.IPluginFactory)
class Authenticator(common.Plugin):
"""SSH Authenticator.
@ -22,8 +24,6 @@ class Authenticator(common.Plugin):
HTTP.
"""
zope.interface.implements(interfaces.IAuthenticator)
zope.interface.classProvides(interfaces.IPluginFactory)
description = "Send authentication tokens through SSH"
@ -58,7 +58,7 @@ class Authenticator(common.Plugin):
ssh = Popen(["ssh", self.conf("server"), self.conf("remote-command")],
stdin=PIPE)
ssh.stdin.write(lines)
ssh.stdin.write(lines.encode('UTF-8'))
ssh.stdin.close()
ssh.wait()


Loading…
Cancel
Save