cubicweb #16497483 adding --profile to "cubicweb pyramid -D app" fails [open]

Traceback (most recent call last):
File "/home/arthur/.virtualenvs/app/local/lib/python2.7/site-packages/cubicweb/cwctl.py", line 145, in run_arg
  status = cmdmeth(appid)
File "/home/arthur/.virtualenvs/app/local/lib/python2.7/site-packages/cubicweb/pyramid/pyramidctl.py", line 328, in pyramid_instance
  repo = app.application.registry['cubicweb.repository']
AttributeError: 'function' object has no attribute 'application'
instance app not started: 'function' object has no attribute 'application'
prioritynormal
typebug
done in<not specified>
closed by<not specified>