Skip to content

Commit 5754728

Browse files
committed
updated netDB to handle spaces in column names
1 parent 2646916 commit 5754728

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cbmpy/CBNetDB.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ def createDBTable(self, table, sqlcols):
141141
142142
Effectively writes CREATE TABLE "table" (<id> <type>, gene TEXT PRIMARY KEY, aa_seq TEXT, nuc_seq TEXT, aa_len INT, nuc_len INT) % table
143143
"""
144-
SQL = 'CREATE TABLE %s (' % table
144+
SQL = 'CREATE TABLE "{}" ('.format(table)
145145
for c in sqlcols:
146-
SQL += ' %s,' % c
146+
SQL += ' "{}",'.format(c)
147147
SQL = SQL[:-1]
148148
SQL += ' )'
149149
print(SQL)

0 commit comments

Comments
 (0)