~mvo/software-center/lp846204

2658.2.1 by Michael Vogt
improve debug support for utils/piston-helpers/piston_generic_helper.py and add README.debug-server with some examples
1
When debugging server issues or inspecting the expected results
2
its often useful to run
3
"utils/piston-helpers/piston_generic_helper.py" in debug mode.
4
5
Some examples:
6
$ PYTHONPATH=. utils/piston-helpers/piston_generic_helper.py \
7
   --output=text --debug --needs-auth \
8
   SoftwareCenterAgentAPI subscriptions_for_me
9
10
$ PYTHONPATH=. utils/piston-helpers/piston_generic_helper.py \
2668 by Michael Vogt
README.debug-server: add a json encoded kwargs example; softwarecenter/ui/gtk3/widgets/reviews.py,test/test_xapian_query.py: trivial pyflakes fixes
11
  --output=text --debug --needs-auth \
12
  SoftwareCenterAgentAPI available_apps_qa \
13
  '{ "lang" : "en", "series" : "oneiric", "arch" : "i386" }'
14
15
$ PYTHONPATH=. utils/piston-helpers/piston_generic_helper.py \
2705 by Michael Vogt
README.debug-server: add another example and how to enable HTTP header debug
16
  --output=text --debug  \
17
  SoftwareCenterAgentAPI available_apps \
18
  '{ "lang" : "en", "series" : "oneiric", "arch" : "i386" }'
19
20
$ PYTHONPATH=. utils/piston-helpers/piston_generic_helper.py \
2658.2.1 by Michael Vogt
improve debug support for utils/piston-helpers/piston_generic_helper.py and add README.debug-server with some examples
21
   --output=text --debug \
22
   SoftwareCenterRecommenderAPI recommend_top
23
24
25
Any piston-mini-client API should work, first name is the class
2705 by Michael Vogt
README.debug-server: add another example and how to enable HTTP header debug
26
second the method to run, optional is a json encoded kwargs string.
27
28
To get http debug output you can use the environment variable
2705.1.1 by Michael Vogt
utils/piston-helpers/piston_generic_helper.py: fix forgotten cachedir in constructor
29
SOFTWARE_CENTER_DEBUG_HTTP=1.