mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-23 07:19:42 +02:00
fix read config file
This commit is contained in:
parent
6633243745
commit
816179cfa4
1 changed files with 18 additions and 14 deletions
|
@ -45,6 +45,7 @@ def config():
|
||||||
global FAKE_SCAN, QUARANTINE, QUARANTINE_FOLDER
|
global FAKE_SCAN, QUARANTINE, QUARANTINE_FOLDER
|
||||||
global CURSES
|
global CURSES
|
||||||
# intantiate a ConfirParser
|
# intantiate a ConfirParser
|
||||||
|
try :
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
# read the config file
|
# read the config file
|
||||||
config.read('pandora-box.ini')
|
config.read('pandora-box.ini')
|
||||||
|
@ -57,6 +58,9 @@ def config():
|
||||||
QUARANTINE_FOLDER = config['DEFAULT']['QUARANTINE_FOLDER']
|
QUARANTINE_FOLDER = config['DEFAULT']['QUARANTINE_FOLDER']
|
||||||
# Curses
|
# Curses
|
||||||
CURSES = config['DEFAULT']['CURSES'].lower()=="true"
|
CURSES = config['DEFAULT']['CURSES'].lower()=="true"
|
||||||
|
except Exception as e :
|
||||||
|
log("Could not read config file: %s" % e)
|
||||||
|
raise e
|
||||||
|
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
|
|
||||||
|
@ -445,7 +449,7 @@ def log_device_info(dev):
|
||||||
|
|
||||||
"""Scan a mount point with Pandora"""
|
"""Scan a mount point with Pandora"""
|
||||||
def scan(mount_point, used):
|
def scan(mount_point, used):
|
||||||
global infected_filed
|
global infected_filed, FAKE_SCAN
|
||||||
infected_files = []
|
infected_files = []
|
||||||
scanned = 0
|
scanned = 0
|
||||||
file_count = 0
|
file_count = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue