Make RBClient cookie_file optional
Review Request #3913 — Created Feb. 25, 2013 and submitted
Information | |
---|---|
smacleod | |
RBTools | |
master | |
Reviewers | |
rbtools | |
Make RBClient cookie_file optional If a cookie_file is not provided it will now default to '~/.rbtools-cookies'. Also, if we default to '~/.rbtools-cookies' and it does not exist, we will attempt to copy the old '~/.post-review-cookies.txt' file over.
Accessed the API using default and provided cookie files, observed proper behaviour.
Description | From | Last Updated |
---|---|---|
Should optimistically import from cStringIO, like: try: from cStringIO import StringIO except ImportError: from StringIO import StringIO |
|
|
We need to be careful with this. I'm not sure we want to do it this way. With just post-review, … |
|
|
Col: 43 E128 continuation line under-indented for visual indent |
![]() |
|
We should catch any IOErrors here. There may be permission problems we should log but not die from. |
|
|
Indentation is off. |
|
-
-
rbtools/api/request.py (Diff revision 1) Should optimistically import from cStringIO, like: try: from cStringIO import StringIO except ImportError: from StringIO import StringIO
-
rbtools/api/request.py (Diff revision 1) We need to be careful with this. I'm not sure we want to do it this way. With just post-review, we knew that we were *the* app, and we knew what we were writing. We don't know that with an API. os.umask could easily break a consumer. I'd suggest we check for the existence of the file, and if it's not there, create it and chmod, then reference it. Actually, this would be a good time to do an import of .post-review-cookies.txt, too. If the cookie file is missing, and we have a .post-review-cookies.txt, copy it over.
SM
Change Summary:
Update based on Christian's review.
Description: |
|
|||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+53 -24) |

-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: rbtools/api/transport/sync.py rbtools/api/request.py rbtools/commands/__init__.py Ignored Files:
-
rbtools/api/request.py (Diff revision 2) Col: 43 E128 continuation line under-indented for visual indent

-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: rbtools/api/transport/sync.py rbtools/api/request.py rbtools/commands/__init__.py Ignored Files:

-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: rbtools/api/transport/sync.py rbtools/api/request.py rbtools/commands/__init__.py Ignored Files:
-
-
rbtools/api/request.py (Diff revision 4) We should catch any IOErrors here. There may be permission problems we should log but not die from.

-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: rbtools/api/transport/sync.py rbtools/api/request.py rbtools/commands/__init__.py Ignored Files: