Return the ATR of the card inserted into the reader.

def GetATR(self, reader):
        """Return the ATR of the card inserted into the reader."""
        atr = "no card inserted"
        try:
            if not type(reader) is str:
                connection = reader.createConnection()
                connection.connect()
                atr = toHexString(connection.getATR())
                connection.disconnect()
        except NoCardException:
            pass
        except CardConnectionException:
            pass
        return atr