• 
      

    Make RBClient cookie_file optional

    Review Request #3913 — Created Feb. 25, 2013 and submitted

    Information

    RBTools
    master

    Reviewers

    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

    chipx86chipx86

    We need to be careful with this. I'm not sure we want to do it this way. With just post-review, …

    chipx86chipx86

    Col: 43 E128 continuation line under-indented for visual indent

    reviewbotreviewbot

    We should catch any IOErrors here. There may be permission problems we should log but not die from.

    chipx86chipx86

    Indentation is off.

    chipx86chipx86
    reviewbot
    1. 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:
      
      
    2. 
        
    chipx86
    1. 
        
    2. rbtools/api/request.py (Diff revision 1)
       
       
      Show all issues
      Should optimistically import from cStringIO, like:
      
      try:
          from cStringIO import StringIO
      except ImportError:
          from StringIO import StringIO
    3. rbtools/api/request.py (Diff revision 1)
       
       
      Show all issues
      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.
    4. 
        
    SM
    reviewbot
    1. 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:
      
      
    2. rbtools/api/request.py (Diff revision 2)
       
       
      Show all issues
      Col: 43
       E128 continuation line under-indented for visual indent
      
    3. 
        
    SM
    reviewbot
    1. 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:
      
      
    2. 
        
    SM
    reviewbot
    1. 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:
      
      
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    1. 
        
    2. rbtools/api/request.py (Diff revision 4)
       
       
       
       
       
       
       
      Show all issues
      We should catch any IOErrors here. There may be permission problems we should log but not die from.
    3. 
        
    SM
    reviewbot
    1. 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:
      
      
    2. 
        
    chipx86
    1. One thing, then ship it.
    2. rbtools/api/request.py (Diff revisions 4 - 5)
       
       
       
      Show all issues
      Indentation is off.
    3. 
        
    SM
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (20f925a70fa079d799cfeccd3e9e05a08bd614b8).