tess lagi

This commit is contained in:
yasirarism 2023-07-01 21:03:29 +07:00 committed by GitHub
parent 8f78d7ee77
commit 26184cfb09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 35 deletions

View file

@ -1,15 +0,0 @@
# File : .pep8speaks.yml
scanner:
linter: flake8
flake8:
max-line-length: 100
ignore:
- W503 # line break before binary operator
message:
opened:
header: "@{name}, Thanks for opening this PR."
updated:
header: "@{name}, Thanks for updating this PR."

View file

@ -12,24 +12,6 @@ from dotenv import load_dotenv
LOGGER = getLogger(__name__)
CONFIG_FILE_URL = os.environ.get("CONFIG_FILE_URL", "")
try:
if len(CONFIG_FILE_URL) == 0:
raise TypeError
try:
res = requests.get(CONFIG_FILE_URL)
if res.status_code == 200:
with open("config.env", "wb+") as f:
f.write(res.content)
else:
LOGGER.error(f"config.env err: {res.status_code}")
except Exception as e:
LOGGER.error(f"ENV_URL: {e}")
except:
pass
load_dotenv("config.env", override=True)
def getConfig(name: str):
try:

View file

@ -46,7 +46,7 @@ if UPSTREAM_REPO_URL is not None and UPSTREAM_REPO_BRANCH is not None:
&& git fetch origin -q \
&& git reset --hard origin/{UPSTREAM_REPO_BRANCH} -q"], shell=True)
if update.returncode == 0:
logging.info(f'Successfully updated with latest commit branch > {UPSTREAM_REPO_BRANCH}')
LOGGER.info(f'Successfully updated with latest commit branch > {UPSTREAM_REPO_BRANCH}')
else:
logging.error(f'Something went wrong while updating, check UPSTREAM_REPO_URL if valid or not! return code: {update.returncode}')
LOGGER.error(f'Something went wrong while updating, check UPSTREAM_REPO_URL if valid or not! return code: {update.returncode}')
sys.exit(1)