What version are you running?
git master
What's the URL of the page containing the problem?
post-review script architecture
What is the expected output? What do you see instead?
1.
---
Problem:
-----------------
(the biggest one) When I import postreview in mod_python and some function
from postreview just end by die() function I don't see anything on output
Solution:
-----------------
die should raise exception which should be catch in calling main() block,
print and then sys.exit(1) which have sens only when running as command
line program
2.
---
Problem:
-----------------
Variable "options" in postreview is global, and "only" way to pass
"options" is use command line parameters. This isn't good.
Solution:
-----------------
Some solution is parametrize main() by current options.*
Workaround (example):
-----------------
import rbtools.postreview as rb
class Empty():
pass
rb.options = Empty()
rb.options.rid = None
rb.options.debug = None
rb.options.username = USERNAME
rb.options.password = PASSOWRD
rb.options.server = SERVER
rb.options.publish = False
rb.options.summary = TITLE
rb.options.bugs_closed = BUGS
rb.options.description = DESCRIPTION
rb.options.submit_as = SUBMIT_AS
rb.options.repository_url = REPOSITORY_URL
rb.options.diff_filename = None
rb.options.ccroot_path = None
rb.options.target_groups = None
rb.options.target_people = REVIEWER
rb.options.branch = None
rb.options.testing_done = None
3.
---
Problem:
-----------------
Run main() with custom tool or home is impossible
Solution:
-----------------
Add main() additional parameters like tool, home or something and make the
logic only for run tool as command line before
Workaround:
-----------------
Some things is could be modified by inject some environment variables as
HOME or APPDATA
What operating system are you using? What browser?
Linux / Unix
Please provide any additional information below.