file()->open()

This commit is contained in:
Michel Oosterhof
2016-03-22 17:06:37 +04:00
parent df8b287331
commit 156b97efe3
2 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ class LoggingServerProtocol(insults.ServerProtocol):
return
if self.stdinlog_open:
with file(self.stdinlog_file, 'ab') as f:
with open(self.stdinlog_file, 'ab') as f:
f.write(data)
elif self.ttylog_open:
ttylog.ttylog_write(self.ttylog_file, len(data),

View File

@ -48,7 +48,7 @@ class HoneyPotSSHUserAuthServer(userauth.SSHUserAuthServer):
try:
honeyfs = self.portal.realm.cfg.get('honeypot', 'contents_path')
issuefile = honeyfs + "/etc/issue.net"
data = file(issuefile).read()
data = open(issuefile).read()
except IOError:
return
if not data or not len(data.strip()):