mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 08:34:40 +01:00
Fix Namespace is not iterable after change from optparse to argparse
This commit is contained in:
parent
7390c3d486
commit
a3852e10da
1 changed files with 4 additions and 4 deletions
|
@ -43,7 +43,7 @@ parser.add_argument("--debug", dest="debug",
|
|||
parser.add_argument("--database", dest="database", default=filename,
|
||||
help="Database path.", metavar="FILE")
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
args = parser.parse_args()
|
||||
|
||||
if not os.geteuid() == 0:
|
||||
sys.exit('OpenSnitch must be run as root.')
|
||||
|
@ -60,8 +60,8 @@ else:
|
|||
|
||||
logging.basicConfig(
|
||||
format='[%(asctime)s] (%(levelname)s) %(message)s',
|
||||
level=logging.INFO if options.debug is False else logging.DEBUG,
|
||||
filename=options.logfile)
|
||||
level=logging.INFO if args.debug is False else logging.DEBUG,
|
||||
filename=args.logfile)
|
||||
|
||||
|
||||
# At some point Scapy devs will realize how bothering their fucking warnings
|
||||
|
@ -72,7 +72,7 @@ warnings.filterwarnings("ignore", category=RuntimeWarning, module="gtk")
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
snitch = Snitch(options.database)
|
||||
snitch = Snitch(args.database)
|
||||
|
||||
try:
|
||||
logging.info("OpenSnitch v%s running with pid %d.",
|
||||
|
|
Loading…
Add table
Reference in a new issue