Fix a compatibility issue with Perforce on Python 2.4.

Review Request #2498 — Created July 28, 2011 and submitted

Information

Review Board
master

Reviewers

Fix a compatibility issue with Perforce on Python 2.4.

The finally: keyword isn't supported in Python 2.4. Rework an exception
to not need it.
Unit tests pass.
Description From Last Updated

This now won't call _disconnect() in the case of an exception other than P4Exception. This should probably also catch Exception, …

daviddavid
david
  1. 
      
  2. reviewboard/scmtools/perforce.py (Diff revision 1)
     
     
    Show all issues
    This now won't call _disconnect() in the case of an exception other than P4Exception. This should probably also catch Exception, _disconnect(), and then re-throw it.
  3. 
      
chipx86
david
  1. One final change: can you add a comment that this should ideally be using "with"?
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Committed to master (279747c)