mirror of
https://github.com/djohnlewis/stackdump
synced 2025-01-22 22:51:36 +00:00
19 lines
377 B
Plaintext
19 lines
377 B
Plaintext
|
#!/usr/bin/python2.5
|
||
|
|
||
|
import sys
|
||
|
|
||
|
try:
|
||
|
uri = sys.argv[1]
|
||
|
except IndexError:
|
||
|
sys.exit("Usage: %s old-style-URI" % sys.argv[0])
|
||
|
|
||
|
try:
|
||
|
import pkg_resources
|
||
|
pkg_resources.require('SQLObject>=1.0.0')
|
||
|
except (ImportError, pkg_resources.DistributionNotFound):
|
||
|
pass
|
||
|
|
||
|
from sqlobject import connectionForURI
|
||
|
conn = connectionForURI(uri, oldUri=True)
|
||
|
print conn.uri()
|