mirror of https://gitlab.com/bashrc2/epicyon
Less indentation
parent
3814caeb11
commit
e8ed8c5365
|
@ -883,13 +883,14 @@ def run_newswire_daemon(base_dir: str, httpd,
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
# if a new blog post has been created then stop
|
# if a new blog post has been created then stop
|
||||||
# waiting and recalculate the newswire
|
# waiting and recalculate the newswire
|
||||||
if os.path.isfile(refresh_filename):
|
if not os.path.isfile(refresh_filename):
|
||||||
try:
|
continue
|
||||||
os.remove(refresh_filename)
|
try:
|
||||||
except OSError:
|
os.remove(refresh_filename)
|
||||||
print('EX: run_newswire_daemon unable to delete ' +
|
except OSError:
|
||||||
str(refresh_filename))
|
print('EX: run_newswire_daemon unable to delete ' +
|
||||||
break
|
str(refresh_filename))
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
def run_newswire_watchdog(project_version: str, httpd) -> None:
|
def run_newswire_watchdog(project_version: str, httpd) -> None:
|
||||||
|
|
11
posts.py
11
posts.py
|
@ -201,11 +201,12 @@ def no_of_followers_on_domain(base_dir: str, handle: str,
|
||||||
try:
|
try:
|
||||||
with open(filename, 'r', encoding='utf-8') as fp_followers:
|
with open(filename, 'r', encoding='utf-8') as fp_followers:
|
||||||
for follower_handle in fp_followers:
|
for follower_handle in fp_followers:
|
||||||
if '@' in follower_handle:
|
if '@' not in follower_handle:
|
||||||
follower_domain = follower_handle.split('@')[1]
|
continue
|
||||||
follower_domain = remove_eol(follower_domain)
|
follower_domain = follower_handle.split('@')[1]
|
||||||
if domain == follower_domain:
|
follower_domain = remove_eol(follower_domain)
|
||||||
ctr += 1
|
if domain == follower_domain:
|
||||||
|
ctr += 1
|
||||||
except OSError as exc:
|
except OSError as exc:
|
||||||
print('EX: no_of_followers_on_domain unable to read ' + filename +
|
print('EX: no_of_followers_on_domain unable to read ' + filename +
|
||||||
' ' + str(exc))
|
' ' + str(exc))
|
||||||
|
|
Loading…
Reference in New Issue