commit 2c2b956d99dfbcebc3f5288ead093e6335907940 Author: David Fifield david@bamsoftware.com Date: Thu Oct 10 12:14:03 2013 -0700
Break getopt long options into separate lines. --- facilitator/facilitator | 12 ++++++++++-- facilitator/facilitator-email-poller | 15 +++++++++++++-- facilitator/facilitator-reg | 5 ++++- flashproxy-client | 18 +++++++++++++++++- flashproxy-reg-appspot | 8 +++++++- flashproxy-reg-email | 11 ++++++++++- flashproxy-reg-http | 7 ++++++- flashproxy-reg-url | 7 ++++++- 8 files changed, 73 insertions(+), 10 deletions(-)
diff --git a/facilitator/facilitator b/facilitator/facilitator index 080c2f5..7bb3819 100755 --- a/facilitator/facilitator +++ b/facilitator/facilitator @@ -327,8 +327,16 @@ def put_reg(reg): return REGS.add(reg)
def main(): - opts, args = getopt.gnu_getopt(sys.argv[1:], "dhl:p:r:", - ["debug", "help", "log=", "port=", "pidfile=", "privdrop-user=", "relay=", "unsafe-logging"]) + opts, args = getopt.gnu_getopt(sys.argv[1:], "dhl:p:r:", [ + "debug", + "help", + "log=", + "port=", + "pidfile=", + "privdrop-user=", + "relay=", + "unsafe-logging", + ]) for o, a in opts: if o == "-d" or o == "--debug": options.daemonize = False diff --git a/facilitator/facilitator-email-poller b/facilitator/facilitator-email-poller index 6691afc..3504c51 100755 --- a/facilitator/facilitator-email-poller +++ b/facilitator/facilitator-email-poller @@ -163,8 +163,19 @@ def log(msg): options.email_addr = DEFAULT_EMAIL_ADDRESS options.imap_addr = (DEFAULT_IMAP_HOST, DEFAULT_IMAP_PORT)
-opts, args = getopt.gnu_getopt(sys.argv[1:], "de:hi:l:p:", - ["debug", "disable-pin", "email=", "help", "imap=", "imaplib-debug", "log=", "pass=", "pidfile=", "privdrop-user=", "unsafe-logging"]) +opts, args = getopt.gnu_getopt(sys.argv[1:], "de:hi:l:p:", [ + "debug", + "disable-pin", + "email=", + "help", + "imap=", + "imaplib-debug", + "log=", + "pass=", + "pidfile=", + "privdrop-user=", + "unsafe-logging", +]) for o, a in opts: if o == "-d" or o == "--debug": options.daemonize = False diff --git a/facilitator/facilitator-reg b/facilitator/facilitator-reg index f3d2dc9..67f8bb1 100755 --- a/facilitator/facilitator-reg +++ b/facilitator/facilitator-reg @@ -25,7 +25,10 @@ registration was successful, 1 otherwise. }
def main(): - opts, args = getopt.gnu_getopt(sys.argv[1:], "hp:", ["help", "port="]) + opts, args = getopt.gnu_getopt(sys.argv[1:], "hp:", [ + "help", + "port=", + ]) for o, a in opts: if o == "-h" or o == "--help": usage() diff --git a/flashproxy-client b/flashproxy-client index bd314aa..5bf3f70 100755 --- a/flashproxy-client +++ b/flashproxy-client @@ -1110,7 +1110,23 @@ def main(): register_addr_spec = None register_methods = []
- opts, args = getopt.gnu_getopt(sys.argv[1:], "46f:hl:r", ["daemon", "external", "facilitator=", "facilitator-pubkey=", "help", "log=", "pidfile=", "register", "register-addr=", "register-methods=", "port-forwarding", "port-forwarding-helper=", "port-forwarding-external=", "transport=", "unsafe-logging"]) + opts, args = getopt.gnu_getopt(sys.argv[1:], "46f:hl:r", [ + "daemon", + "external", + "facilitator=", + "facilitator-pubkey=", + "help", + "log=", + "pidfile=", + "register", + "register-addr=", + "register-methods=", + "port-forwarding", + "port-forwarding-helper=", + "port-forwarding-external=", + "transport=", + "unsafe-logging", + ]) for o, a in opts: if o == "-4": options.address_family = socket.AF_INET diff --git a/flashproxy-reg-appspot b/flashproxy-reg-appspot index dc8a5aa..0f51e4f 100755 --- a/flashproxy-reg-appspot +++ b/flashproxy-reg-appspot @@ -272,7 +272,13 @@ def get_external_ip(): finally: f.close()
-opt, args = getopt.gnu_getopt(sys.argv[1:], "46h", ["disable-pin", "facilitator-pubkey=", "help", "transport=", "unsafe-logging"]) +opt, args = getopt.gnu_getopt(sys.argv[1:], "46h", [ + "disable-pin", + "facilitator-pubkey=", + "help", + "transport=", + "unsafe-logging", +]) for o, a in opt: if o == "-4": options.address_family = socket.AF_INET diff --git a/flashproxy-reg-email b/flashproxy-reg-email index 95edfbf..4b99de8 100755 --- a/flashproxy-reg-email +++ b/flashproxy-reg-email @@ -221,7 +221,16 @@ def get_facilitator_pubkey(): options.email_addr = DEFAULT_EMAIL_ADDRESS options.smtp_addr = (DEFAULT_SMTP_HOST, DEFAULT_SMTP_PORT)
-opts, args = getopt.gnu_getopt(sys.argv[1:], "46de:hs:", ["debug", "disable-pin", "email=", "facilitator-pubkey=", "help", "smtp=", "transport=", "unsafe-logging"]) +opts, args = getopt.gnu_getopt(sys.argv[1:], "46de:hs:", [ + "debug", + "disable-pin", + "email=", + "facilitator-pubkey=", + "help", + "smtp=", + "transport=", + "unsafe-logging", +]) for o, a in opts: if o == "-4": options.address_family = socket.AF_INET diff --git a/flashproxy-reg-http b/flashproxy-reg-http index 100edd9..8aa9397 100755 --- a/flashproxy-reg-http +++ b/flashproxy-reg-http @@ -111,7 +111,12 @@ def build_reg(addr, transport): options.facilitator_url = DEFAULT_FACILITATOR_URL options.remote_addr = (DEFAULT_REMOTE_ADDRESS, DEFAULT_REMOTE_PORT)
-opts, args = getopt.gnu_getopt(sys.argv[1:], "46f:h", ["facilitator=", "help", "transport=", "unsafe-logging"]) +opts, args = getopt.gnu_getopt(sys.argv[1:], "46f:h", [ + "facilitator=", + "help", + "transport=", + "unsafe-logging", +]) for o, a in opts: if o == "-4": options.address_family = socket.AF_INET diff --git a/flashproxy-reg-url b/flashproxy-reg-url index c8ebd44..26675a0 100755 --- a/flashproxy-reg-url +++ b/flashproxy-reg-url @@ -121,7 +121,12 @@ def get_facilitator_pubkey():
options.facilitator_url = DEFAULT_FACILITATOR_URL
-opt, args = getopt.gnu_getopt(sys.argv[1:], "f:h", ["facilitator=", "facilitator-pubkey=", "help", "transport="]) +opt, args = getopt.gnu_getopt(sys.argv[1:], "f:h", [ + "facilitator=", + "facilitator-pubkey=", + "help", + "transport=", +]) for o, a in opt: if o == "-f" or o == "--facilitator": options.facilitator_url = a
tor-commits@lists.torproject.org