1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00

Delay loading modules and objects until gettext is loaded

This was resulting in strings not getting translated, especially when
the calls to gettext came at the lowest indent level of the module.
This commit is contained in:
dmiller
2014-01-09 22:27:15 +00:00
parent bc47cb3d97
commit 314a519dfc
5 changed files with 163 additions and 13 deletions

View File

@@ -125,6 +125,7 @@ from zenmapCore.Name import APP_NAME, NMAP_DISPLAY_NAME
from zenmapCore.Version import VERSION
import zenmapCore.I18N
from zenmapCore.BasePaths import base_paths
from zenmapCore.DelayedObject import DelayedObject
class UmitOptionParser(OptionParser):
@@ -259,7 +260,7 @@ used more than once to get even more verbosity"))
"""
return 40 - (self.options.verbose * 10)
option_parser = UmitOptionParser()
option_parser = DelayedObject(UmitOptionParser)
if __name__ == "__main__":
opt = UmitOptionParser()