From 8c0c1f98268de8e8c3de183ea85abad67a4e41ed Mon Sep 17 00:00:00 2001 From: Livio Recchia Date: Fri, 17 Apr 2020 22:47:14 +0200 Subject: Used python instead of python2 in auto.sh --- plugins/shop.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'plugins/shop.py') diff --git a/plugins/shop.py b/plugins/shop.py index adeb66f..d45dff2 100755 --- a/plugins/shop.py +++ b/plugins/shop.py @@ -38,8 +38,8 @@ shop_admins = None # FIXME Put on a specified library def preloadArray(nfile): try: - file = open(nfile, "r") array=[] + file = open(nfile, "r") for x in file.readlines(): x = x.replace("\n", "") x = x.replace("\r", "") @@ -54,7 +54,7 @@ sell_greetings = [ ] buy_greetings = [ - "Okay! Let's see what you've got to sell!", + "Okay, {0}! Let's see what you've got to sell!", ] sell_greetings = preloadArray("config/sellGreetings.txt") @@ -547,6 +547,8 @@ def load_shop_list(config): shoplist_txt = config.get('shop', 'shoplist_txt') if not os.path.isfile(shoplist_txt): shoplog.warning('shoplist file not found : %s', shoplist_txt) + print 'Error: shoplist file not found :' + shoplist_txt + os._exit(255) return with open(shoplist_txt, 'r') as f: @@ -574,6 +576,10 @@ def init(config): shop_admins_file = config.get('shop', 'admins_file') if os.path.isfile(shop_admins_file): shop_admins = PlayerList(shop_admins_file) + else: + shoplog.warning('shop admin file not found : %s', shop_admins_file) + print 'Error: shop admin file not found :' + shop_admins_file + badge.is_shop = True -- cgit v1.2.3-70-g09d2