forked from LBRYCommunity/lbry-sdk
move check for if daemon is running to inside of function
This commit is contained in:
parent
257e38de12
commit
34b1259dc6
1 changed files with 8 additions and 6 deletions
|
@ -4,14 +4,16 @@ import json
|
|||
from lbrynet.conf import API_CONNECTION_STRING, LOG_FILE_NAME
|
||||
from jsonrpc.proxy import JSONRPCProxy
|
||||
|
||||
api = JSONRPCProxy.from_url(API_CONNECTION_STRING)
|
||||
|
||||
try:
|
||||
s = api.is_running()
|
||||
except:
|
||||
print "lbrynet-daemon isn't running"
|
||||
|
||||
def main():
|
||||
api = JSONRPCProxy.from_url(API_CONNECTION_STRING)
|
||||
|
||||
try:
|
||||
s = api.is_running()
|
||||
except:
|
||||
print "lbrynet-daemon isn't running"
|
||||
sys.exit(1)
|
||||
|
||||
args = sys.argv[1:]
|
||||
meth = args[0]
|
||||
if len(args) > 1:
|
||||
|
|
Loading…
Reference in a new issue