mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-01-24 16:44:29 +01:00
don't write fd == None. Use not fd:
This commit is contained in:
@@ -313,7 +313,7 @@ class HoneyPotFilesystem(object):
|
||||
return os.write(fd, string)
|
||||
|
||||
def close(self, fd):
|
||||
if (fd == None):
|
||||
if not fd:
|
||||
return True
|
||||
if self.tempfiles[fd] is not None:
|
||||
shasum = hashlib.sha256(open(self.tempfiles[fd], 'rb').read()).hexdigest()
|
||||
@@ -330,7 +330,7 @@ class HoneyPotFilesystem(object):
|
||||
return os.close(fd)
|
||||
|
||||
def lseek(self, fd, offset, whence):
|
||||
if (fd == None):
|
||||
if not fd:
|
||||
return True
|
||||
return os.lseek(fd, offset, whence)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user