when i try to use URI like "firebird://localhost/database" (database - database alias) in linux, i see error:
--- cut ---
File "/usr/lib/python2.4/site-packages/SQLObject-0.9dev_r2147-py2.4.egg/sqlobject/sresults.py", line 160, in __iter__
return iter(list(self.lazyIter()))
File "/usr/lib/python2.4/site-packages/SQLObject-0.9dev_r2147-py2.4.egg/sqlobject/sresults.py", line 168, in lazyIter
return conn.iterSelect(self)
File "/usr/lib/python2.4/site-packages/SQLObject-0.9dev_r2147-py2.4.egg/sqlobject/dbconnection.py", line 373, in iterSelect
return select.IterationClass(self, self.getConnection(),
File "/usr/lib/python2.4/site-packages/SQLObject-0.9dev_r2147-py2.4.egg/sqlobject/dbconnection.py", line 239, in getConnection
conn = self.makeConnection()
File "/usr/lib/python2.4/site-packages/SQLObject-0.9dev_r2147-py2.4.egg/sqlobject/firebird/firebirdconnection.py", line 87, in makeConnection
charset=self.charset,
File "/var/lib/python-support/python2.4/kinterbasdb/__init__.py", line 472, in connect
return Connection(*args, **keywords_args)
File "/var/lib/python-support/python2.4/kinterbasdb/__init__.py", line 610, in __init__
self._C_con = _k.attach_db(dsn, dpb, dialect)
OperationalError: (-902, 'isc_attach_database: I/O error for file "/database". Error while trying to open file. No such file or directory. ')
--- end cut ---
path fix this problem
Patch for fixing problem with using firebird db aliases on unix systems
Logged In: YES
user_id=1240394
Originator: YES
bug also present in revision 2175
Logged In: YES
user_id=4799
Originator: NO
Can I change
if path[-3:].lower() != 'fdb' and path[-3:].lower() != 'gdb':
to
if path[-3:].lower() not in ('fdb', 'gdb'):
?
Logged In: YES
user_id=1240394
Originator: YES
yes, your variant is better
Logged In: YES
user_id=4799
Originator: NO
Also I think I can now remove the code
if os.name == 'nt' and path[0] == '/':
# strip the leading slash off of db name/alias
path = path[1:]
?
Logged In: YES
user_id=1240394
Originator: YES
yes
Logged In: YES
user_id=4799
Originator: NO
Applied and committed to all branches (0.7, 0.8, trunk) in the revisions 2209-2212. Thank you!