smutt / danish

Experiments with middle-box DANE
GNU General Public License v3.0
6 stars 0 forks source link

Danish does not pay attention to the logfile size #2

Closed smutt closed 7 years ago

smutt commented 7 years ago

Still not sure why LOG_SIZE is not respected. Will need to fix this eventually but it's a low prio now.

The below code still does not do what I want:

if not (os.stat(LOG_FNAME).st_size / 1024 > LOG_SIZE): LOG_HANDLE.write(outStr + '\n') else: LOG_HANDLE.close()

smutt commented 7 years ago

For whatever reason the following IF statement will never evaluate to FALSE.

if int(os.stat(LOG_FNAME).st_size / 1024) < LOG_SIZE:

os.stat(fname).st_size weirdly returns a long on OpenWRT/LEDE, and an integer on my Debian Linux. Could be some other weirdness that I'm not seeing here as well.

smutt commented 7 years ago

Fixed