Changeset 180

Show
Ignore:
Timestamp:
11/16/09 11:10:55 (9 months ago)
Author:
lrousseau
Message:

fix problems reported by pep8

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pykcs11/trunk/samples/getinfo.py

    r173 r180  
    2727        print self.magenta + text + self.blue, arg, self.normal 
    2828 
    29     def __init__(self, lib = None): 
     29    def __init__(self, lib=None): 
    3030        if sys.stdout.isatty() and platform.system().lower() != 'windows': 
    3131            self.red = "\x1b[01;31m" 
     
    8383    def getInfo(self): 
    8484        info = self.pkcs11.getInfo() 
    85         self.colorize("Library Cryptoki Version:", "%d.%d" % info.cryptokiVersion) 
     85        self.colorize("Library Cryptoki Version:", 
     86            "%d.%d" % info.cryptokiVersion) 
    8687        self.colorize("Library manufacturerID:", info.manufacturerID) 
    8788        self.colorize("Library flags:", info.flags) 
     
    8990        self.colorize("Library Version:", "%d.%d" % info.libraryVersion) 
    9091 
    91     def getSessionInfo(self, slot, pin = None): 
     92    def getSessionInfo(self, slot, pin=None): 
    9293        session = self.pkcs11.openSession(slot) 
    9394        s = session.getSessionInfo() 
     
    118119 
    119120    try: 
    120         opts, args = getopt.getopt(sys.argv[1:], "p:s:c:ho", ["pin=", "slot=", "lib=", "help", "opensession"]) 
     121        opts, args = getopt.getopt(sys.argv[1:], "p:s:c:ho", 
     122            ["pin=", "slot=", "lib=", "help", "opensession"]) 
    121123    except getopt.GetoptError: 
    122124        # print help information and exit: 
     
    154156 
    155157    if slot: 
    156         slots = [ slots[slot]
     158        slots = [slots[slot]
    157159 
    158160    for slot in slots: 
     
    164166        except PyKCS11.PyKCS11Error, e: 
    165167            print "Error:", e 
    166  
(C) 2006 bit4id srl, for informations please contact info@bit4id.com
visitors since August 21, 2006