Skip to content

Commit deebdc7

Browse files
authored
Merge pull request #1 from J-E-J-S/node-fix
fixed bug in satisying getpapers status
2 parents 559c568 + a096e85 commit deebdc7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

journalMiner/pyminer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import pandas as pd
77
import shutil
88
import click
9+
import subprocess
910

1011
def get_papers(query, folder_path, limit):
1112

@@ -18,8 +19,8 @@ def get_papers(query, folder_path, limit):
1819

1920
# Try to see if getpapers is installed
2021
try:
21-
os.system(command)
22-
except:
22+
subprocess.run(command, check = True)
23+
except subprocess.CalledProcessError:
2324
os.system('npm install -g getpapers')
2425
os.system(command)
2526

0 commit comments

Comments
 (0)