moved logger options after log_file variable
This commit is contained in:
@@ -325,13 +325,7 @@ if __name__ == "__main__":
|
|||||||
help="Output debug/verbose info to the console for troubleshooting."
|
help="Output debug/verbose info to the console for troubleshooting."
|
||||||
)
|
)
|
||||||
opts, args = parser.parse_args(sys.argv[1:])
|
opts, args = parser.parse_args(sys.argv[1:])
|
||||||
|
|
||||||
if opts.debug:
|
|
||||||
logger = build_logger(logging.DEBUG)
|
|
||||||
else:
|
|
||||||
logger = build_logger(logging.INFO)
|
|
||||||
|
|
||||||
secure_delete.secure_random_seed_init()
|
|
||||||
os_detected = platform.system()
|
os_detected = platform.system()
|
||||||
script_directory = os.path.dirname(os.path.realpath(__file__))
|
script_directory = os.path.dirname(os.path.realpath(__file__))
|
||||||
working_directory = os.path.join(script_directory, "working")
|
working_directory = os.path.join(script_directory, "working")
|
||||||
@@ -342,6 +336,11 @@ if __name__ == "__main__":
|
|||||||
log_file = os.path.join(script_directory, "log.log")
|
log_file = os.path.join(script_directory, "log.log")
|
||||||
datetime_string = datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
|
datetime_string = datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
|
||||||
|
|
||||||
|
if opts.debug:
|
||||||
|
logger = build_logger(logging.DEBUG)
|
||||||
|
else:
|
||||||
|
logger = build_logger(logging.INFO)
|
||||||
|
|
||||||
if os_detected == "Windows":
|
if os_detected == "Windows":
|
||||||
bitwarden_cli_executable = os.path.join(script_directory, "lib", "Bitwarden CLI", "bw.exe")
|
bitwarden_cli_executable = os.path.join(script_directory, "lib", "Bitwarden CLI", "bw.exe")
|
||||||
gpg_executable = os.path.join(script_directory, "lib", "gpg", "bin", "gpg.exe")
|
gpg_executable = os.path.join(script_directory, "lib", "gpg", "bin", "gpg.exe")
|
||||||
|
|||||||
Reference in New Issue
Block a user