Properly exit on no channel path being available. - annna - Annna the nice friendly bot.
HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
---
DIR commit b078e0710d6543cab2e891ec0825ba5ead7562d9
DIR parent a386263fc5344f8c2f783a8685a9dce1a9b6449d
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sun, 24 Mar 2024 18:21:55 +0100
Properly exit on no channel path being available.
Diffstat:
M modules/idlerpg/idlerpg-channel-se… | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
DIR diff --git a/modules/idlerpg/idlerpg-channel-service.py b/modules/idlerpg/idlerpg-channel-service.py
@@ -50,10 +50,13 @@ def writeout_dictfile(f, d):
fd.close()
def say(fpath, text):
- fd = open(fpath, "w")
- fd.write("%s\n" % (text))
- fd.flush()
- fd.close()
+ try:
+ fd = open(fpath, "w")
+ fd.write("%s\n" % (text))
+ fd.flush()
+ fd.close()
+ except:
+ sys.exit(1)
def usage(app):
app = os.path.basename(app)