From 9b9726a41770d96f9ccaa855bf33099a798d2374 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 25 Dec 2021 20:09:29 +0000 Subject: [PATCH] Snake case --- daemon.py | 4 ++-- epicyon.py | 12 ++++++------ newsdaemon.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/daemon.py b/daemon.py index 5b2500fb9..c37895ed6 100644 --- a/daemon.py +++ b/daemon.py @@ -18443,7 +18443,7 @@ def runDaemon(content_license_url: str, max_followers: int, max_news_posts: int, max_mirrored_articles: int, - maxNewswireFeedSizeKb: int, + max_newswire_feed_size_kb: int, max_newswire_postsPerSource: int, show_published_date_only: bool, votingTimeMins: int, @@ -18638,7 +18638,7 @@ def runDaemon(content_license_url: str, httpd.newswireVotesThreshold = newswireVotesThreshold # maximum overall size of an rss/atom feed read by the newswire daemon # If the feed is too large then this is probably a DoS attempt - httpd.maxNewswireFeedSizeKb = maxNewswireFeedSizeKb + httpd.max_newswire_feed_size_kb = max_newswire_feed_size_kb # For each newswire source (account or rss feed) # this is the maximum number of posts to show for each. diff --git a/epicyon.py b/epicyon.py index b25566b92..1ef784024 100644 --- a/epicyon.py +++ b/epicyon.py @@ -196,7 +196,7 @@ parser.add_argument('--max_newswire_posts', default=20, help='Maximum newswire posts in the right column') parser.add_argument('--maxFeedSize', - dest='maxNewswireFeedSizeKb', type=int, + dest='max_newswire_feed_size_kb', type=int, default=10240, help='Maximum newswire rss/atom feed size in K') parser.add_argument('--max_feed_item_size_kb', @@ -3038,10 +3038,10 @@ if max_newswire_posts: args.max_newswire_posts = int(max_newswire_posts) # set the maximum size of a newswire rss/atom feed in Kilobytes -maxNewswireFeedSizeKb = \ - getConfigParam(base_dir, 'maxNewswireFeedSizeKb') -if maxNewswireFeedSizeKb: - args.maxNewswireFeedSizeKb = int(maxNewswireFeedSizeKb) +max_newswire_feed_size_kb = \ + getConfigParam(base_dir, 'max_newswire_feed_size_kb') +if max_newswire_feed_size_kb: + args.max_newswire_feed_size_kb = int(max_newswire_feed_size_kb) max_mirrored_articles = \ getConfigParam(base_dir, 'max_mirrored_articles') @@ -3235,7 +3235,7 @@ if __name__ == "__main__": args.max_followers, args.max_news_posts, args.max_mirrored_articles, - args.maxNewswireFeedSizeKb, + args.max_newswire_feed_size_kb, args.max_newswire_postsPerSource, args.dateonly, args.votingtime, diff --git a/newsdaemon.py b/newsdaemon.py index 8dd55ec4f..6fba5cd49 100644 --- a/newsdaemon.py +++ b/newsdaemon.py @@ -797,7 +797,7 @@ def runNewswireDaemon(base_dir: str, httpd, newNewswire = \ getDictFromNewswire(httpd.session, base_dir, domain, httpd.max_newswire_postsPerSource, - httpd.maxNewswireFeedSizeKb, + httpd.max_newswire_feed_size_kb, httpd.maxTags, httpd.max_feed_item_size_kb, httpd.max_newswire_posts,