Merge pull request #39 from tituspijean/ciclic-import-config

Make ciclic read config.py to retrieve PORT
This commit is contained in:
Alexandre Aubin 2022-01-18 21:40:47 +01:00 committed by GitHub
commit 62068de646
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

6
ciclic
View file

@ -7,8 +7,12 @@ import requests
from argh.decorators import named from argh.decorators import named
try:
from config import *
except ImportError:
PORT="4242"
DOMAIN = "localhost:4242" DOMAIN = "localhost:" + str(PORT)
def require_token(): def require_token():
if os.path.exists("token") and open("token").read().strip(): if os.path.exists("token") and open("token").read().strip():