Don't touch config files during install. (report by Thomas Ballinger)
This commit is contained in:
parent
460fc0c4e7
commit
bbea96bf5f
@ -4,13 +4,6 @@ VERSION = ".".join(str(nv) for nv in NUM_VERSION)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
from pudb.settings import load_config, save_config
|
|
||||||
CONFIG = load_config()
|
|
||||||
save_config(CONFIG)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CURRENT_DEBUGGER = []
|
CURRENT_DEBUGGER = []
|
||||||
def _get_debugger():
|
def _get_debugger():
|
||||||
if not CURRENT_DEBUGGER:
|
if not CURRENT_DEBUGGER:
|
||||||
|
@ -5,7 +5,13 @@ from __future__ import division
|
|||||||
import urwid
|
import urwid
|
||||||
import bdb
|
import bdb
|
||||||
|
|
||||||
from pudb import CONFIG
|
from pudb.settings import load_config, save_config
|
||||||
|
CONFIG = load_config()
|
||||||
|
save_config(CONFIG)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
HELP_TEXT = """\
|
HELP_TEXT = """\
|
||||||
@ -541,7 +547,6 @@ class DebuggerUI(FrameVarInfoKeeper):
|
|||||||
|
|
||||||
# {{{ stack listeners
|
# {{{ stack listeners
|
||||||
def examine_frame(w, size, key):
|
def examine_frame(w, size, key):
|
||||||
from pudb import CONFIG
|
|
||||||
_, pos = self.stack_list._w.get_focus()
|
_, pos = self.stack_list._w.get_focus()
|
||||||
self.debugger.set_frame_index(self.translate_ui_stack_index(pos))
|
self.debugger.set_frame_index(self.translate_ui_stack_index(pos))
|
||||||
|
|
||||||
@ -1259,8 +1264,7 @@ class DebuggerUI(FrameVarInfoKeeper):
|
|||||||
self.message("Package 'pygments' not found. "
|
self.message("Package 'pygments' not found. "
|
||||||
"Syntax highlighting disabled.")
|
"Syntax highlighting disabled.")
|
||||||
|
|
||||||
from pudb import CONFIG
|
WELCOME_LEVEL = "e005"
|
||||||
WELCOME_LEVEL = "e004"
|
|
||||||
if CONFIG["seen_welcome"] < WELCOME_LEVEL:
|
if CONFIG["seen_welcome"] < WELCOME_LEVEL:
|
||||||
CONFIG["seen_welcome"] = WELCOME_LEVEL
|
CONFIG["seen_welcome"] = WELCOME_LEVEL
|
||||||
from pudb import VERSION
|
from pudb import VERSION
|
||||||
@ -1274,6 +1278,8 @@ class DebuggerUI(FrameVarInfoKeeper):
|
|||||||
"look familiar.\n\n"
|
"look familiar.\n\n"
|
||||||
"If you're new here, welcome! The help screen (invoked by hitting "
|
"If you're new here, welcome! The help screen (invoked by hitting "
|
||||||
"'?' after this message) should get you on your way.\n"
|
"'?' after this message) should get you on your way.\n"
|
||||||
|
"\nChanges in version 2012.2.1:\n\n"
|
||||||
|
"- Don't touch config files during install.\n"
|
||||||
"\nChanges in version 2012.2:\n\n"
|
"\nChanges in version 2012.2:\n\n"
|
||||||
"- Add support for BPython as a shell.\n"
|
"- Add support for BPython as a shell.\n"
|
||||||
"- You can now run 'python -m pudb script.py' on Py 2.6+.\n"
|
"- You can now run 'python -m pudb script.py' on Py 2.6+.\n"
|
||||||
@ -1476,8 +1482,6 @@ class DebuggerUI(FrameVarInfoKeeper):
|
|||||||
code.co_name, class_name,
|
code.co_name, class_name,
|
||||||
self._format_fname(code.co_filename), lineno)
|
self._format_fname(code.co_filename), lineno)
|
||||||
|
|
||||||
from pudb import CONFIG
|
|
||||||
|
|
||||||
frame_uis = [make_frame_ui(fl) for fl in self.debugger.stack]
|
frame_uis = [make_frame_ui(fl) for fl in self.debugger.stack]
|
||||||
if CONFIG["current_stack_frame"] == "top":
|
if CONFIG["current_stack_frame"] == "top":
|
||||||
frame_uis = frame_uis[::-1]
|
frame_uis = frame_uis[::-1]
|
||||||
|
@ -32,7 +32,7 @@ class SourceLine(urwid.FlowWidget):
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
def render(self, (maxcol,), focus=False):
|
def render(self, (maxcol,), focus=False):
|
||||||
from pudb import CONFIG
|
from pudb.debugger import CONFIG
|
||||||
render_line_nr = CONFIG["line_numbers"]
|
render_line_nr = CONFIG["line_numbers"]
|
||||||
|
|
||||||
hscroll = self.dbg_ui.source_hscroll_start
|
hscroll = self.dbg_ui.source_hscroll_start
|
||||||
|
@ -9,7 +9,7 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
HAVE_NUMPY = 0
|
HAVE_NUMPY = 0
|
||||||
|
|
||||||
from pudb import CONFIG
|
from pudb.debugger import CONFIG
|
||||||
|
|
||||||
# data ------------------------------------------------------------------------
|
# data ------------------------------------------------------------------------
|
||||||
class FrameVarInfo(object):
|
class FrameVarInfo(object):
|
||||||
|
Loading…
Reference in New Issue
Block a user