1557: post-review crashed if the home directory is not writable

nah****@gmai***** (Google Code) (Is this you? Claim this profile.)
Nov. 6, 2010
What version are you running?
post-review 0.8

What steps will reproduce the problem?
1. Have a non writable home directory (can happen when an automated tool
calls post-review)
2. Post a review using post-review
=> crash
Traceback (most recent call last):
  File "/usr/bin/post-review", line 9, in <module>
    load_entry_point('RBTools==0.2rc1', 'console_scripts', 'post-review')()
  File
"/usr/lib64/python2.6/site-packages/RBTools-0.2rc1-py2.6.egg/rbtools/postreview.py",
line 2804, in main
    server.login()
  File
"/usr/lib64/python2.6/site-packages/RBTools-0.2rc1-py2.6.egg/rbtools/postreview.py",
line 341, in login
    'password': password,
  File
"/usr/lib64/python2.6/site-packages/RBTools-0.2rc1-py2.6.egg/rbtools/postreview.py",
line 622, in api_post
    return self.process_json(self.http_post(path, fields, files))
  File
"/usr/lib64/python2.6/site-packages/RBTools-0.2rc1-py2.6.egg/rbtools/postreview.py",
line 606, in http_post
    self.cookie_jar.save(self.cookie_file)
  File "/usr/lib64/python2.6/_MozillaCookieJar.py", line 118, in save
    f = open(filename, "w")
IOError: [Errno 13] Permission denied: '.post-review-cookies.txt'


What is the expected output? What do you see instead?
post-review should handle that gracefully. The cookie file is not necessary
to the functioning of post-review so the error should be ignored (and
display a warning when run with -d/--debug parameter).
david
#1 david
Fixed in rbtools d19d300. Thanks!
  • +Fixed