Add a -v (and -vv) flag and decrease default message verbosity.

This commit is contained in:
Avery Pennarun
2010-05-02 02:14:20 -04:00
parent a244b325cb
commit 2dd328ada4
7 changed files with 42 additions and 26 deletions

View File

@ -1,4 +1,5 @@
import subprocess, re
import helpers
from helpers import *
@ -15,7 +16,7 @@ def chain_exists(name):
def ipt(*args):
argv = ['iptables', '-t', 'nat'] + list(args)
log('>> %s\n' % ' '.join(argv))
debug1('>> %s\n' % ' '.join(argv))
rv = subprocess.call(argv)
if rv:
raise Exception('%r returned %d' % (argv, rv))