Skip to content

Commit

Permalink
fix use of globals
Browse files Browse the repository at this point in the history
  • Loading branch information
Mausy5043 committed Oct 17, 2024
1 parent 83a0576 commit 21e9052
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/trend.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ def prune(objects):


def fetch_data(hours_to_fetch=48, aggregation="10min"):
global EDATETIME # pylint: disable=W0603
if OPTION.edate:
print("NOT NOW")
EDATETIME = f"'{OPTION.edate}'"
"""..."""
data_dict_rht = fetch_data_rht(hours_to_fetch=hours_to_fetch, aggregation=aggregation)
data_dict_ac = fetch_data_ac(hours_to_fetch=hours_to_fetch, aggregation=aggregation)
data_dict = {}
Expand Down Expand Up @@ -410,6 +407,9 @@ def main():
if OPTION.devlist:
OPTION.devlist = json.loads(OPTION.devlist)
DEVICE_LIST = prune(DEVICE_LIST)
if OPTION.edate:
print("NOT NOW")
EDATETIME = f"'{OPTION.edate}'"
if OPTION.debug:
print(OPTION)
main()

0 comments on commit 21e9052

Please sign in to comment.