mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-07 18:51:34 +03:00
undo changes from curses.wrapper test
This commit is contained in:
parent
8c86335c93
commit
e1df6555fd
@ -1448,7 +1448,7 @@ class glancesScreen:
|
||||
# If global used MEM > WARINING => Sorted by MEM usage
|
||||
__process_sortedby = 'auto'
|
||||
|
||||
def __init__(self, cursesScreen, refresh_time=1, use_bold=1):
|
||||
def __init__(self, refresh_time=1, use_bold=1):
|
||||
# Global information to display
|
||||
self.__version = __version__
|
||||
|
||||
@ -1485,7 +1485,7 @@ class glancesScreen:
|
||||
self.caption_y = 3
|
||||
|
||||
# Init the curses screen
|
||||
self.screen = cursesScreen
|
||||
self.screen = curses.initscr()
|
||||
if not self.screen:
|
||||
print(_("Error: Cannot init the curses library.\n"))
|
||||
|
||||
@ -3716,7 +3716,7 @@ def signal_handler(signal, frame):
|
||||
end()
|
||||
|
||||
|
||||
def main(cursesScreen):
|
||||
def main():
|
||||
# Glances - Init stuff
|
||||
######################
|
||||
|
||||
@ -3960,7 +3960,7 @@ def main(cursesScreen):
|
||||
stats = GlancesStatsClient()
|
||||
|
||||
# Init screen
|
||||
screen = glancesScreen(cursesScreen, refresh_time=refresh_time,
|
||||
screen = glancesScreen(refresh_time=refresh_time,
|
||||
use_bold=use_bold)
|
||||
else:
|
||||
# Init the classical CLI
|
||||
@ -3985,7 +3985,7 @@ def main(cursesScreen):
|
||||
refresh_time=refresh_time)
|
||||
|
||||
# Init screen
|
||||
screen = glancesScreen(cursesScreen, refresh_time=refresh_time,
|
||||
screen = glancesScreen(refresh_time=refresh_time,
|
||||
use_bold=use_bold)
|
||||
|
||||
# Glances - Main loop
|
||||
@ -4045,7 +4045,7 @@ def getTimeSinceLastUpdate(IOType):
|
||||
#=====
|
||||
|
||||
if __name__ == "__main__":
|
||||
curses.wrapper(main)
|
||||
main()
|
||||
|
||||
|
||||
# The end...
|
||||
|
Loading…
Reference in New Issue
Block a user