mirror of https://gitlab.com/bashrc2/epicyon
Show warnings for exceptions
parent
07495f9e5d
commit
68ad5840eb
1
auth.py
1
auth.py
|
@ -255,4 +255,5 @@ def recordLoginFailure(baseDir: str, ipAddress: str,
|
||||||
ipAddress + ' port 443: ' +
|
ipAddress + ' port 443: ' +
|
||||||
'Too many authentication failures [preauth]\n')
|
'Too many authentication failures [preauth]\n')
|
||||||
except BaseException:
|
except BaseException:
|
||||||
|
print('WARN: recordLoginFailure failed ' + str(failureLog))
|
||||||
pass
|
pass
|
||||||
|
|
20
blocking.py
20
blocking.py
|
@ -517,6 +517,8 @@ def mutePost(baseDir: str, nickname: str, domain: str, port: int,
|
||||||
os.remove(cachedPostFilename)
|
os.remove(cachedPostFilename)
|
||||||
print('MUTE: cached post removed ' + cachedPostFilename)
|
print('MUTE: cached post removed ' + cachedPostFilename)
|
||||||
except BaseException:
|
except BaseException:
|
||||||
|
print('WARN: MUTE cached post not removed ' +
|
||||||
|
cachedPostFilename)
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
print('MUTE: cached post not found ' + cachedPostFilename)
|
print('MUTE: cached post not found ' + cachedPostFilename)
|
||||||
|
@ -554,6 +556,9 @@ def mutePost(baseDir: str, nickname: str, domain: str, port: int,
|
||||||
print('MUTE: cached referenced post removed ' +
|
print('MUTE: cached referenced post removed ' +
|
||||||
cachedPostFilename)
|
cachedPostFilename)
|
||||||
except BaseException:
|
except BaseException:
|
||||||
|
print('WARN: ' +
|
||||||
|
'MUTE cached referenced post not removed ' +
|
||||||
|
cachedPostFilename)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if recentPostsCache.get('json'):
|
if recentPostsCache.get('json'):
|
||||||
|
@ -583,6 +588,9 @@ def unmutePost(baseDir: str, nickname: str, domain: str, port: int,
|
||||||
try:
|
try:
|
||||||
os.remove(muteFilename)
|
os.remove(muteFilename)
|
||||||
except BaseException:
|
except BaseException:
|
||||||
|
if debug:
|
||||||
|
print('WARN: unmutePost mute filename not deleted ' +
|
||||||
|
str(muteFilename))
|
||||||
pass
|
pass
|
||||||
print('UNMUTE: ' + muteFilename + ' file removed')
|
print('UNMUTE: ' + muteFilename + ' file removed')
|
||||||
|
|
||||||
|
@ -631,6 +639,9 @@ def unmutePost(baseDir: str, nickname: str, domain: str, port: int,
|
||||||
try:
|
try:
|
||||||
os.remove(cachedPostFilename)
|
os.remove(cachedPostFilename)
|
||||||
except BaseException:
|
except BaseException:
|
||||||
|
if debug:
|
||||||
|
print('WARN: unmutePost cached post not deleted ' +
|
||||||
|
str(cachedPostFilename))
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# if the post is in the recent posts cache then mark it as unmuted
|
# if the post is in the recent posts cache then mark it as unmuted
|
||||||
|
@ -661,6 +672,10 @@ def unmutePost(baseDir: str, nickname: str, domain: str, port: int,
|
||||||
print('MUTE: cached referenced post removed ' +
|
print('MUTE: cached referenced post removed ' +
|
||||||
cachedPostFilename)
|
cachedPostFilename)
|
||||||
except BaseException:
|
except BaseException:
|
||||||
|
if debug:
|
||||||
|
print('WARN: ' +
|
||||||
|
'unmutePost cached ref post not removed ' +
|
||||||
|
str(cachedPostFilename))
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if recentPostsCache.get('json'):
|
if recentPostsCache.get('json'):
|
||||||
|
@ -804,6 +819,8 @@ def setBrochMode(baseDir: str, domainFull: str, enabled: bool) -> None:
|
||||||
try:
|
try:
|
||||||
os.remove(allowFilename)
|
os.remove(allowFilename)
|
||||||
except BaseException:
|
except BaseException:
|
||||||
|
print('WARN: setBrochMode allow file not deleted ' +
|
||||||
|
str(allowFilename))
|
||||||
pass
|
pass
|
||||||
print('Broch mode turned off')
|
print('Broch mode turned off')
|
||||||
else:
|
else:
|
||||||
|
@ -857,6 +874,7 @@ def brochModeLapses(baseDir: str, lapseDays: int = 7) -> bool:
|
||||||
modifiedDate = \
|
modifiedDate = \
|
||||||
datetime.strptime(lastModified, "%Y-%m-%dT%H:%M:%SZ")
|
datetime.strptime(lastModified, "%Y-%m-%dT%H:%M:%SZ")
|
||||||
except BaseException:
|
except BaseException:
|
||||||
|
print('WARN: brochModeLapses date not parsed ' + str(lastModified))
|
||||||
return False
|
return False
|
||||||
if not modifiedDate:
|
if not modifiedDate:
|
||||||
return False
|
return False
|
||||||
|
@ -868,6 +886,8 @@ def brochModeLapses(baseDir: str, lapseDays: int = 7) -> bool:
|
||||||
os.remove(allowFilename)
|
os.remove(allowFilename)
|
||||||
removed = True
|
removed = True
|
||||||
except BaseException:
|
except BaseException:
|
||||||
|
print('WARN: brochModeLapses allow file not deleted ' +
|
||||||
|
str(allowFilename))
|
||||||
pass
|
pass
|
||||||
if removed:
|
if removed:
|
||||||
setConfigParam(baseDir, "brochMode", False)
|
setConfigParam(baseDir, "brochMode", False)
|
||||||
|
|
Loading…
Reference in New Issue