From 87c88a243bbaffc1024666b9cb86a17c163c1ed3 Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Thu, 6 Oct 2022 03:31:40 +0200 Subject: [PATCH] README update and a type conversion fix. --- README.md | 2 ++ bin/linspector | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c3c7bb0..e69cbe6 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,8 @@ source tree is ok when respecting the license. Not using 3rd party libraries should always be preferred though. - Inline comments should be all lowercase. Descriptions and documentation comments 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 diff --git a/bin/linspector b/bin/linspector index 35ee331..e10f2a6 100755 --- a/bin/linspector +++ b/bin/linspector @@ -111,14 +111,14 @@ def main(): logging.Formatter('[%(asctime)s]:[%(levelname)s]:[%(name)s]:%(message)s') if configuration.get_option('linspector', 'log_file_size'): - log_file_size_mb = float(configuration.get_option('linspector', 'log_file_size')) - log_file_size_bytes = float(log_file_size_mb * 1000000) + log_file_size_mb = int(configuration.get_option('linspector', 'log_file_size')) + log_file_size_bytes = int(log_file_size_mb * 1000000) 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')) else: # 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'): log_file_count = int(configuration.get_option('linspector', 'log_file_count'))