Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1602 by Jan.Koprowski: post-review is extremly useless as external library

*NOTE: Do not post confidential information in this bug report.*

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?

(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

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

Variable "options" in postreview is global, and "only" way to pass
"options" is use command line parameters. This isn't good.

Some solution is parametrize main() by current options.*

Workaround (example):
import rbtools.postreview as rb

class Empty():

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

Run main() with custom tool or home is impossible

Add main() additional parameters like tool, home or something and make the
logic only for run tool as command line before

Some things is could be modified by inject some environment variables as

What operating system are you using? What browser?
Linux / Unix

Please provide any additional information below.

You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:

You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to