updated exception syntax

This commit is contained in:
Michel Oosterhof 2015-02-26 11:46:55 +00:00
parent 81b1ea36ae
commit f1bcd95bf2
1 changed files with 3 additions and 3 deletions

View File

@ -155,7 +155,7 @@ class HoneyPotRealm:
return interfaces[0], \
HoneyPotAvatar(avatarId, self.env), lambda: None
else:
raise Exception, "No supported interfaces found."
raise Exception("No supported interfaces found.")
class HoneyPotTransport(sshserver.KippoSSHServerTransport):
"""
@ -307,8 +307,8 @@ class HoneyPotAvatar(avatar.ConchUser):
cfg.get('honeypot', 'exec_enabled').lower() not in \
('yes', 'true', 'on'):
log.msg( 'Exec disabled. Not executing command: "%s"' % cmd )
raise exceptions.NotEnabledException, \
'exec_enabled not enabled in configuration file!'
raise exceptions.NotEnabledException(
'exec_enabled not enabled in configuration file!')
return
log.msg( 'exec command: "%s"' % cmd )