Changeset d58ee5e


Ignore:
Timestamp:
Jun 21, 2012 11:11:13 AM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, master
Children:
7ec0dc2, d064566
Parents:
ef7d689
Message:

ALways save creds, even on partial import

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    ref7d689 rd58ee5e  
    16191619                    "Bad request format (no NewRequestBody)")
    16201620
    1621         if self.auth.import_credentials(data_list=req.get('credential', [])):
    1622             self.auth.save()
     1621        # import may partially succeed so always save credentials and warn
     1622        if not self.auth.import_credentials(data_list=req.get('credential', [])):
     1623            self.log.debug("Failed to import delegation credentials(!)")
     1624        self.auth.save()
    16231625
    16241626        try:
     
    21192121
    21202122        # Import information from the requester
    2121         if self.auth.import_credentials(data_list=req.get('credential', [])):
    2122             self.auth.save()
    2123         else:
     2123        # import may partially succeed so always save credentials and warn
     2124        if not self.auth.import_credentials(data_list=req.get('credential', [])):
    21242125            self.log.debug("Failed to import delegation credentials(!)")
     2126        self.auth.save()
    21252127
    21262128        try:
Note: See TracChangeset for help on using the changeset viewer.