From 67ff70957eda26c3718fd1c81f0ec3c028b4fef3 Mon Sep 17 00:00:00 2001 From: Lars Ridder Date: Tue, 31 Oct 2017 16:24:05 +0100 Subject: [PATCH] Allow empty lines in pubchem ids_file --- job/magma/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/job/magma/__init__.py b/job/magma/__init__.py index 01c91cc..2562522 100644 --- a/job/magma/__init__.py +++ b/job/magma/__init__.py @@ -1274,7 +1274,7 @@ def __init__(self, db, dbfilename='', max_64atoms=False, incl_halo='', min_refsc if max_64atoms: self.where += ' AND natoms <= 64' if ids_file: - ids = ','.join([i.split()[0] for i in open(ids_file, 'r')]) + ids = ','.join([i.split()[0] for i in open(ids_file, 'r') if i != '\n']) self.where += ' AND cid IN (' + ids + ')' def query_online(self, select, incl_halo):