mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
Minor pylint fixes
This commit is contained in:
parent
09e8a75930
commit
eae507d456
@ -144,14 +144,14 @@ def get_modules_to_load():
|
|||||||
module_directory = os.path.join(cfg.config_dir, 'modules-enabled')
|
module_directory = os.path.join(cfg.config_dir, 'modules-enabled')
|
||||||
|
|
||||||
# Omit hidden files
|
# Omit hidden files
|
||||||
file_names = [file
|
file_names = [file_name
|
||||||
for file in os.listdir(module_directory)
|
for file_name in os.listdir(module_directory)
|
||||||
if not file.startswith('.') and '.dpkg' not in file]
|
if not file_name.startswith('.') and '.dpkg' not in file_name]
|
||||||
|
|
||||||
for file_name in file_names:
|
for file_name in file_names:
|
||||||
full_file_name = os.path.join(module_directory, file_name)
|
full_file_name = os.path.join(module_directory, file_name)
|
||||||
with open(full_file_name, 'r') as file:
|
with open(full_file_name, 'r') as file_handle:
|
||||||
for line in file:
|
for line in file_handle:
|
||||||
line = re.sub('#.*', '', line)
|
line = re.sub('#.*', '', line)
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
if line:
|
if line:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user