don't write fd == None. Use not fd:

This commit is contained in:
Michel Oosterhof
2015-11-17 16:29:39 +00:00
parent 494fd6829b
commit 5bc6e344b9

View File

@@ -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)