mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Debugging
This commit is contained in:
parent
7ed324fdb6
commit
def9f54044
@ -1,3 +1,5 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import wmi, sys, winreg, os, subprocess, json, re
|
import wmi, sys, winreg, os, subprocess, json, re
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import argparse
|
import argparse
|
||||||
@ -379,7 +381,9 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
if(args.conf):
|
if(args.conf):
|
||||||
try:
|
try:
|
||||||
config.read_string('[CONF]\n' + open(args.conf).read())
|
with open(args.conf, 'r', encoding='utf-8') as f:
|
||||||
|
content = f.read()
|
||||||
|
config.read_string('[CONF]\n' + content)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Error while reading configuration file, using default values: "+str(e), file=sys.stderr)
|
print("Error while reading configuration file, using default values: "+str(e), file=sys.stderr)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user