diff options
author | Dastgir <dastgirp@gmail.com> | 2018-10-07 14:02:16 +0530 |
---|---|---|
committer | Dastgir <dastgirp@gmail.com> | 2018-10-13 16:34:09 +0530 |
commit | 9e879ea913ec93212ebd46f56990d1e90209b32a (patch) | |
tree | ee9928f16cae4b53ebeb722d8417e0aa3dcddca2 /tools | |
parent | 838d12f50e5a78f271a67292141b463404a33fe4 (diff) | |
download | hercules-9e879ea913ec93212ebd46f56990d1e90209b32a.tar.gz hercules-9e879ea913ec93212ebd46f56990d1e90209b32a.tar.bz2 hercules-9e879ea913ec93212ebd46f56990d1e90209b32a.tar.xz hercules-9e879ea913ec93212ebd46f56990d1e90209b32a.zip |
Fixes LGTM Alert: Added Exceptions
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/mobdbconverter.py | 2 | ||||
-rw-r--r-- | tools/mobskilldbconverter.py | 2 | ||||
-rw-r--r-- | tools/petdbconverter.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tools/mobdbconverter.py b/tools/mobdbconverter.py index 525952976..683e28274 100755 --- a/tools/mobdbconverter.py +++ b/tools/mobdbconverter.py @@ -260,7 +260,7 @@ def readItemDB(inFile, itemDb): elif line[:3] == "Id:": try: itemId = int(line[4:]) - except: + except ValueError: started = False if itemId != 0 and itemName != "": # was need for remove wrong characters diff --git a/tools/mobskilldbconverter.py b/tools/mobskilldbconverter.py index 310331043..4ba042062 100644 --- a/tools/mobskilldbconverter.py +++ b/tools/mobskilldbconverter.py @@ -206,7 +206,7 @@ def LoadOldDB(mode, serverpath): continue try: Db[MonsterId][skillidx]['val{}'.format(i)] = int(entry[12 + i]) - except: + except ValueError: Db[MonsterId][skillidx]['val{}'.format(i)] = int(entry[12 + i], 16) Db[MonsterId][skillidx]['Emotion'] = entry[17] Db[MonsterId][skillidx]['ChatMsgID'] = entry[18] diff --git a/tools/petdbconverter.py b/tools/petdbconverter.py index 261c1e6ad..1b7d2e4d6 100644 --- a/tools/petdbconverter.py +++ b/tools/petdbconverter.py @@ -175,7 +175,7 @@ def readItemDB(inFile, itemDb): elif line[:3] == "Id:": try: itemId = int(line[4:]) - except: + except ValueError: started = False if itemId != 0 and itemName != "": # was need for remove wrong characters |