Changeset 16539


Ignore:
Timestamp:
Aug 18, 2016, 5:47:52 PM (3 years ago)
Author:
dcorreia
Message:

Added function to check if user+card combination already exists.

Location:
internals/2016/linuxloginsmartcardwizard/trunk/proto1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • internals/2016/linuxloginsmartcardwizard/trunk/proto1/config.py

    r16535 r16539  
    204204
    205205
     206def checkUserCardCombo(username, certificate=None):
     207    if certificate is None:
     208        certificate = getCardSubject()
     209    combo = certificate.strip() + " -> " + username + "\n"
     210    return not hasUserCardCombo(combo)
     211
     212
    206213def addUserMapping(username, certificate=None):
    207214    """
     
    309316    except FileNotFoundError as error:
    310317        fileHelper.printDebugInfo(error)
     318    except TypeError as error:
     319        fileHelper.printDebugInfo(error)
     320        return None
    311321
    312322
  • internals/2016/linuxloginsmartcardwizard/trunk/proto1/fileHelper.py

    r16523 r16539  
    2525        return True
    2626    except subprocess.CalledProcessError as error:
    27         print("DEBUG: executeCommand (%s) - %s" % (command, error), file=sys.stderr)
     27        print("DEBUG Error: executeCommand (%s) - %s" % (command, error), file=sys.stderr)
    2828        return False
    2929
Note: See TracChangeset for help on using the changeset viewer.