README update and a type conversion fix.

This commit is contained in:
Johannes Findeisen 2022-10-06 03:31:40 +02:00
commit 87c88a243b
2 changed files with 6 additions and 4 deletions

View file

@ -63,6 +63,8 @@ source tree is ok when respecting the license. Not using 3rd party libraries
should always be preferred though. should always be preferred though.
- Inline comments should be all lowercase. Descriptions and documentation comments - Inline comments should be all lowercase. Descriptions and documentation comments
must be natural language. must be natural language.
- Arguments to functions must always be in alphabetical order.
- Class member variables must always be in alphabetical order in __init__().
### Required libraries ### Required libraries

View file

@ -111,14 +111,14 @@ def main():
logging.Formatter('[%(asctime)s]:[%(levelname)s]:[%(name)s]:%(message)s') logging.Formatter('[%(asctime)s]:[%(levelname)s]:[%(name)s]:%(message)s')
if configuration.get_option('linspector', 'log_file_size'): if configuration.get_option('linspector', 'log_file_size'):
log_file_size_mb = float(configuration.get_option('linspector', 'log_file_size')) log_file_size_mb = int(configuration.get_option('linspector', 'log_file_size'))
log_file_size_bytes = float(log_file_size_mb * 1000000) log_file_size_bytes = int(log_file_size_mb * 1000000)
elif configuration.get_option('linspector', 'log_file_size_bytes'): elif configuration.get_option('linspector', 'log_file_size_bytes'):
log_file_size_bytes = float(configuration.get_option('linspector', log_file_size_bytes = int(configuration.get_option('linspector',
'log_file_size_bytes')) 'log_file_size_bytes'))
else: else:
# default log file size is 10MB # default log file size is 10MB
log_file_size_bytes = float(10485760) log_file_size_bytes = int(10485760)
if configuration.get_option('linspector', 'log_file_count'): if configuration.get_option('linspector', 'log_file_count'):
log_file_count = int(configuration.get_option('linspector', 'log_file_count')) log_file_count = int(configuration.get_option('linspector', 'log_file_count'))