Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Xennis committed Jun 26, 2016
1 parent 521d54a commit 08fa169
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scholarly_citation_finder/tools/harvester/mag/MagHarvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ def run(self):
for name, file in MagNormalize.FILES.iteritems():
file_pre = get_pre_name(file)
csv_file = os.path.join(self.download_dir, file_pre)
if os.path.isfile(csv_file):
#logger.info('start store {}'.format(csv_file))
if os.path.isfile(csv_file) and hasattr(self, name):
logger.info('start store {}'.format(csv_file))
if getattr(self, name)(csv_file):
os.rename(csv_file, os.path.join(self.download_dir, '~{}'.format(file_pre)))
else:
pass # exceptions already get logged before this line
else:
logger.info('no file {}'.format(csv_file))
logger.info('no attribute {}'.format(name))
logger.info('... or no file {}'.format(csv_file))
logger.info('run done ------------------------')

def affiliations(self, filename):
Expand Down

0 comments on commit 08fa169

Please sign in to comment.