Fix different directory
This commit is contained in:
parent
21a1bdcac8
commit
7ae7ebc6a6
1 changed files with 4 additions and 1 deletions
5
leggi.py
5
leggi.py
|
@ -1,6 +1,7 @@
|
|||
import json
|
||||
import sys
|
||||
from itertools import imap
|
||||
import os.path
|
||||
|
||||
from splinter import Browser
|
||||
|
||||
|
@ -36,7 +37,9 @@ def save_calls(calls, datadir):
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
conf = json.load(open('defaultconf.json'))
|
||||
conf = json.load(open(os.path.join(
|
||||
os.path.dirname(sys.argv[0]),
|
||||
'defaultconf.json')))
|
||||
if len(sys.argv) == 2:
|
||||
conf.update(json.load(open(sys.argv[1])))
|
||||
user, password = read_pass_file(conf['credfile'])
|
||||
|
|
Loading…
Reference in a new issue