Skip to content

Commit 02dfb473fb6bf70bca6f08f1e069c73512857f70 broke Windows compatibility  #61

Closed
@movermeyer

Description

@movermeyer

The change made in commit 02dfb473fb6bf70bca6f08f1e069c73512857f70 broke Windows compatibility.

Before, if crypt was not found, get_crypt returned None. That 'if' statement was removed.

Steps to reproduce:

Use the example code given on the Github page:

import firebirdsql

FIREBIRD_HOST = "localhost"
FIREBIRD_DB = "D:\\Repos\\GWS\\FirebirdLoader\\Databases\\2015-08-06\\LOCALCONFIG.fdb"
FIREBIRD_USER = "SYSDBA"
FIREBIRD_PASS = "masterkey"

conn = firebirdsql.connect(host=FIREBIRD_HOST, database=FIREBIRD_DB, user=FIREBIRD_USER, password=FIREBIRD_PASS)
cur = conn.cursor()

cur.execute("select * from GHUSRCFG")
for c in cur.fetchall():
    print(c)
    conn.close()

Gives the following error:

Traceback (most recent call last):
  File "test3.py", line 8, in <module>
    conn = firebirdsql.connect(host=FIREBIRD_HOST, database=FIREBIRD_DB, user=FIREBIRD_USER,
  File "C:\Python27\lib\site-packages\firebirdsql\__init__.py", line 62, in connect
    return Connection(**kwargs)
  File "C:\Python27\lib\site-packages\firebirdsql\fbcore.py", line 589, in __init__
    self._op_attach()
  File "C:\Python27\lib\site-packages\firebirdsql\wireprotocol.py", line 532, in _op_attach
    enc_pass = get_crypt(self.password)
  File "C:\Python27\lib\site-packages\firebirdsql\wireprotocol.py", line 56, in get_crypt
    return crypt.crypt(plain, '9z')[2:]
AttributeError: 'NoneType' object has no attribute 'crypt'

Tested using:
pyfirebirdsql 0.9.9
Firebird SQL 2.5.4.26856, 64 bit
Windows 7 Pro

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions