Skip to content

Commit

Permalink
Fix empty lines in ids_file also for windows files
Browse files Browse the repository at this point in the history
  • Loading branch information
ridderl committed Oct 31, 2017
1 parent 67ff709 commit 792ccda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion job/magma/__init__.py
Expand Up @@ -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') if i != '\n'])
ids = ','.join([i.split()[0] for i in open(ids_file, 'r') if i not in ['\n', '\r\n']])
self.where += ' AND cid IN (' + ids + ')'

def query_online(self, select, incl_halo):
Expand Down

0 comments on commit 792ccda

Please sign in to comment.