Skip to content

Commit 1112774

Browse files
authored
chore: apply formatting (#19)
1 parent 97ead4b commit 1112774

File tree

4 files changed

+390
-198
lines changed

4 files changed

+390
-198
lines changed

LogUtility.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
# Copyright 2024 Broadcom. All Rights Reserved.
22
# SPDX-License-Identifier: BSD-2-Clause
33

4+
# Standard library imports.
45
import logging
5-
import constants
66
import os
77

8+
# Local application imports.
9+
import constants
10+
811
logger = logging.getLogger(__name__)
912
logger.setLevel(logging.DEBUG)
1013
if not os.path.exists(constants.LOG_PATH):
1114
os.makedirs(constants.LOG_PATH)
12-
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s', datefmt="%Y-%m-%dT%I:%M:%S")
13-
File_Handler = logging.FileHandler('{}{}'.format(constants.LOG_PATH, constants.LOG_FILE_NAME))
15+
formatter = logging.Formatter(
16+
"%(asctime)s %(levelname)s %(message)s", datefmt="%Y-%m-%dT%I:%M:%S"
17+
)
18+
File_Handler = logging.FileHandler(
19+
"{}{}".format(constants.LOG_PATH, constants.LOG_FILE_NAME)
20+
)
1421
File_Handler.setFormatter(formatter)
1522
logger.addHandler(File_Handler)
1623
Stream_Handler = logging.StreamHandler()

constants.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright 2024 Broadcom. All Rights Reserved.
22
# SPDX-License-Identifier: BSD-2-Clause
33

4-
LOG_PATH='./logs/'
5-
LOG_FILE_NAME='imaging.log'
6-
ESXI_CDROM_MOUNT_DIR='./esxi_cdrom_mount'
4+
LOG_PATH = "./logs/"
5+
LOG_FILE_NAME = "imaging.log"
6+
ESXI_CDROM_MOUNT_DIR = "./esxi_cdrom_mount"

0 commit comments

Comments
 (0)