Changeset 1559

Show
Ignore:
Timestamp:
11/13/06 19:46:11 (2 years ago)
Author:
mgood
Message:

AccountManagerPlugin:

supports method shoudn't throw an error if the password store is not configured

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • accountmanagerplugin/0.10/acct_mgr/api.py

    r1558 r1559  
    109109 
    110110    def supports(self, operation): 
    111         return hasattr(self.password_store, operation) 
     111        try: 
     112            store = self.password_store 
     113        except AttributeError: 
     114            return False 
     115        else: 
     116            return hasattr(store, operation) 
    112117 
    113118    def password_store(self): 
  • accountmanagerplugin/trunk/acct_mgr/api.py

    r1558 r1559  
    109109 
    110110    def supports(self, operation): 
    111         return hasattr(self.password_store, operation) 
     111        try: 
     112            store = self.password_store 
     113        except AttributeError: 
     114            return False 
     115        else: 
     116            return hasattr(store, operation) 
    112117 
    113118    def password_store(self):