mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 04:48:00 +01:00
Added some deactivated options for enabling debug logs.
This commit is contained in:
@@ -69,6 +69,9 @@ from optparse import OptionParser
|
||||
#from grp import getgrgid
|
||||
#from os import getgroups,system
|
||||
|
||||
import logging
|
||||
import logging.handler
|
||||
|
||||
CURSES_REVNO=wpath.curses_revision
|
||||
|
||||
# Fix strings in wicd-curses
|
||||
@@ -989,7 +992,7 @@ class appGUI():
|
||||
########################################
|
||||
|
||||
def main():
|
||||
global ui
|
||||
global ui, dlogger
|
||||
# We are _not_ python.
|
||||
misc.RenameProcess('wicd-curses')
|
||||
|
||||
@@ -1003,6 +1006,11 @@ def main():
|
||||
import urwid.curses_display
|
||||
ui = urwid.curses_display.Screen()
|
||||
|
||||
#if options.debug:
|
||||
# dlogger = logging.getLogger("Debug")
|
||||
# dlogger.setLevel(logging.DEBUG)
|
||||
# dlogger.debug("wicd-curses debug logging started")
|
||||
|
||||
# Default Color scheme.
|
||||
# Other potential color schemes can be found at:
|
||||
# http://excess.org/urwid/wiki/RecommendedPalette
|
||||
@@ -1087,10 +1095,12 @@ setup_dbus()
|
||||
########################################
|
||||
if __name__ == '__main__':
|
||||
parser = OptionParser(version="wicd-curses-%s (using wicd %s)" % (CURSES_REVNO,daemon.Hello()))
|
||||
parser.set_defaults(screen='raw')
|
||||
parser.set_defaults(screen='raw',debug=False)
|
||||
parser.add_option("-r", "--raw-screen",action="store_const",const='raw'
|
||||
,dest='screen',help="use urwid's raw screen controller (default)")
|
||||
parser.add_option("-c", "--curses-screen",action="store_const",const='curses',dest='screen',help="use urwid's curses screen controller")
|
||||
parser.add_option("-d", "--debug",action="store_true",
|
||||
,dest='debug',help="enable logging of wicd-curses (currently does nothing)")
|
||||
(options,args) = parser.parse_args()
|
||||
main()
|
||||
# Make sure that the terminal does not try to overwrite the last line of
|
||||
|
||||
Reference in New Issue
Block a user