2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00

[1404] don't do anything if the DB doesn't exist

This commit is contained in:
JINMEI Tatuya
2011-11-21 10:02:43 -08:00
parent 4d3aef6a83
commit 1bb5168b70

View File

@@ -28,6 +28,11 @@ if len(args) == 0:
parser.error('missing argument')
db_file = args[0]
# If the file doesn't exist, there's nothing to do
if not os.path.exists(db_file):
sys.exit(0)
conn = sqlite3.connect(db_file)
cur = conn.cursor()
try: