chiark / gitweb /
rename "password" to "secret" everywhere
[hippotat.git] / hippotat
index 18cd14e582262586ab6190abbbb9633558fe2c63..56e3e458daaa77a5ff7f5cedfd8ad1588792b6fa 100755 (executable)
--- a/hippotat
+++ b/hippotat
@@ -152,7 +152,8 @@ class Client():
       cl.log(DBG.HTTP_CTRL, 'req_err ' + str(err), idof=req)
       if isinstance(err, twisted.python.failure.Failure):
         err = err.getTraceback()
-      print('[%#x] %s' % (id(req), err), file=sys.stderr)
+      print('%s[%#x] %s' % (cl.desc, id(req), err.strip('\n').replace('\n',' / ')),
+            file=sys.stderr)
       if not isinstance(cl.outstanding[req], int):
         raise RuntimeError('[%#x] previously %s' %
                            (id(req), cl.outstanding[req]))
@@ -190,7 +191,7 @@ class Client():
               b'Content-Type: text/plain; charset="utf-8"'  + crlf +
               b'Content-Disposition: form-data; name="m"'   + crlf + crlf +
               str(cl.c.client)            .encode('ascii')  + crlf +
-              cl.c.password                                 + crlf +
+              cl.c.secret                                   + crlf +
               str(cl.c.target_requests_outstanding)
                                           .encode('ascii')  + crlf +
               str(cl.c.http_timeout)      .encode('ascii')  + crlf +
@@ -254,6 +255,9 @@ def process_cfg(_opts, putative_servers, putative_clients):
       c.max_queue_time  = srch(cfg.getint, 'max_queue_time')
       c.vroutes         = srch(cfg.get,    'vroutes')
 
+      try: c.ifname     = srch(cfg_get_raw, 'ifname_client')
+      except NoOptionError: pass
+
       try: c.url = srch(cfg.get,'url')
       except NoOptionError:
         cfg_process_saddrs(c, ss)