Skip to content

Commit

Permalink
Refactor code to remove unused paths
Browse files Browse the repository at this point in the history
  • Loading branch information
0x7878 committed Nov 12, 2024
1 parent 9642657 commit 52e3275
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dbus_opendtu.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
from imports import *

config = None
paths = None
number_of_inverters = 0
number_of_templates = 0


def initialize():
""" Initialize the module """
# pylint: disable=w0603
global config, paths, number_of_inverters, number_of_templates
global config, number_of_inverters, number_of_templates

# configure logging
config = configparser.ConfigParser()
Expand All @@ -38,7 +38,6 @@ def initialize():
number_of_templates = 0



def register_service():
""" Register the service """
global number_of_inverters
Expand Down Expand Up @@ -86,6 +85,7 @@ def register_service():
istemplate=True,
)


def main():
""" Main function """
initialize()
Expand All @@ -107,5 +107,6 @@ def main():
except Exception as error:
logging.critical("Error at %s", "main", exc_info=error)


if __name__ == "__main__":
main()

0 comments on commit 52e3275

Please sign in to comment.