Skip to content

Commit 35c2ea9

Browse files
committed
prepare for easier scripting
1 parent 1c4377f commit 35c2ea9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

sqlite_bro/sqlite_bro.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,10 @@ def new_db(self, filename=''):
173173
self.conn = Baresql(self.database_file)
174174
self.actualize_db()
175175

176-
def open_db(self, isolation_level=None):
176+
def open_db(self, filename='', isolation_level=None):
177177
"""open an existing database"""
178-
filename = filedialog.askopenfilename(
178+
if filename == '':
179+
filename = filedialog.askopenfilename(
179180
initialdir=self.initialdir, defaultextension='.db',
180181
filetypes=[("default", "*.db"), ("other", "*.db*"),
181182
("all", "*.*")])
@@ -1644,8 +1645,7 @@ def _main():
16441645
SELECT ItemNo, Description FROM Item; -- see all is back to normal
16451646
RELEASE SAVEPOINT remember_Neo; -- free memory
16461647
\n\n-- '.' commands understood:
1647-
-- .attach DATABASE Attach the given Database DATABASE
1648-
1648+
-- .attach DATABASE Attach the given Database DATABASE
16491649
-- .headers on|off Include column headers in next .once exports (default on)
16501650
-- .separator COL Set column separator in next .once exports (default ,)
16511651
-- .once [--bom] FILE Output of next SQL command to FILE [with utf-8 bom]

0 commit comments

Comments
 (0)