New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit 02dfb473fb6bf70bca6f08f1e069c73512857f70 broke Windows compatibility #61

Closed
movermeyer opened this Issue Aug 10, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@movermeyer
Contributor

movermeyer commented Aug 10, 2015

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

nakagami added a commit that referenced this issue Aug 10, 2015

Merge pull request #62 from movermeyer/master
Fixing Issue #61: Commit 02dfb47 bro…
@nakagami

This comment has been minimized.

Owner

nakagami commented Aug 10, 2015

merge #62

@nakagami nakagami closed this Aug 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment