diff options
author | Haru <haru@dotalux.com> | 2018-11-13 15:57:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 15:57:29 +0100 |
commit | 1af5b8f747099cc19741d148fdac9768b518caf8 (patch) | |
tree | 28ee00cda8e630775316d191325c391563c9b30d /tools/utils/common.py | |
parent | 78def4452300ef252370c6de9f030ed52d70322a (diff) | |
parent | 9e879ea913ec93212ebd46f56990d1e90209b32a (diff) | |
download | hercules-1af5b8f747099cc19741d148fdac9768b518caf8.tar.gz hercules-1af5b8f747099cc19741d148fdac9768b518caf8.tar.bz2 hercules-1af5b8f747099cc19741d148fdac9768b518caf8.tar.xz hercules-1af5b8f747099cc19741d148fdac9768b518caf8.zip |
Merge pull request #2268 from dastgirp/lgtm/python
Fixes alerts shown by LGTM for python
Diffstat (limited to 'tools/utils/common.py')
-rw-r--r-- | tools/utils/common.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/utils/common.py b/tools/utils/common.py index 7b7811654..acceb9b30 100644 --- a/tools/utils/common.py +++ b/tools/utils/common.py @@ -35,13 +35,13 @@ def LoadDBConsts(DBname, mode, serverpath): with io.open(filename) as f: config = libconf.load(f) db = config[DBname] - if DBname is 'item_db': + if DBname == 'item_db': for i, v in enumerate(db): consts[db[i].Id] = db[i].AegisName - elif DBname is 'mob_db': + elif DBname == 'mob_db': for i, v in enumerate(db): consts[db[i].Id] = db[i].SpriteName - elif DBname is 'skill_db': + elif DBname == 'skill_db': for i, v in enumerate(db): consts[db[i].Id] = db[i].Name else: @@ -55,7 +55,6 @@ def LoadDB(DBname, mode, serverpath): if os.path.isfile(serverpath + 'db/{}2.conf'.format(DBname)): filenames.append(serverpath + 'db/{}2.conf'.format(DBname)) - consts = dict() for filename in filenames: with io.open(filename) as f: config = libconf.load(f) |