mirror of
https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot
synced 2024-11-21 19:42:38 +01:00
Stop forcing sys.argv[1] for creds
This is not really needed
This commit is contained in:
parent
260ec45d9d
commit
9489dc3653
1 changed files with 3 additions and 1 deletions
4
lib.py
4
lib.py
|
@ -1,6 +1,7 @@
|
|||
import json
|
||||
import sys
|
||||
import time
|
||||
import os
|
||||
|
||||
import requests
|
||||
|
||||
|
@ -19,7 +20,8 @@ class Client(object):
|
|||
|
||||
@classmethod
|
||||
def newFromCreds(cls):
|
||||
with open(sys.argv[1], 'r') as f:
|
||||
dir_path = os.path.dirname(os.path.realpath(__file__))
|
||||
with open(os.path.join(dir_path, 'creds.json'), 'r') as f:
|
||||
creds = json.loads(f.read())
|
||||
return cls(*creds)
|
||||
|
||||
|
|
Loading…
Reference in a new issue