From df04999c46d0c7832f0b8332427c332c8a5cb2c9 Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Fri, 8 Oct 2010 07:46:13 +0200 Subject: [PATCH] Don't expect eos to throw an exception if ammo is invalid, be big and check it ourselves **Proud* --- service/fit.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/service/fit.py b/service/fit.py index 57e6e92b4..3533ec4f3 100644 --- a/service/fit.py +++ b/service/fit.py @@ -248,10 +248,9 @@ class Fit(object): ammo = eos.db.getItem(ammoID) for pos in modules: - try: + mod = fit.modules[pos] + if mod.isValidCharge(ammo): fit.modules[pos].charge = ammo - except: - pass fit.clear() - fit.calculateModifiedAttributes() \ No newline at end of file + fit.calculateModifiedAttributes()