Don't touch config files during install. (report by Thomas Ballinger)

This commit is contained in:
Andreas Kloeckner 2012-06-06 11:47:13 -04:00
parent 460fc0c4e7
commit bbea96bf5f
4 changed files with 12 additions and 15 deletions

View File

@ -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 = []
def _get_debugger():
if not CURRENT_DEBUGGER:

View File

@ -5,7 +5,13 @@ from __future__ import division
import urwid
import bdb
from pudb import CONFIG
from pudb.settings import load_config, save_config
CONFIG = load_config()
save_config(CONFIG)
HELP_TEXT = """\
@ -541,7 +547,6 @@ class DebuggerUI(FrameVarInfoKeeper):
# {{{ stack listeners
def examine_frame(w, size, key):
from pudb import CONFIG
_, pos = self.stack_list._w.get_focus()
self.debugger.set_frame_index(self.translate_ui_stack_index(pos))
@ -1259,8 +1264,7 @@ class DebuggerUI(FrameVarInfoKeeper):
self.message("Package 'pygments' not found. "
"Syntax highlighting disabled.")
from pudb import CONFIG
WELCOME_LEVEL = "e004"
WELCOME_LEVEL = "e005"
if CONFIG["seen_welcome"] < WELCOME_LEVEL:
CONFIG["seen_welcome"] = WELCOME_LEVEL
from pudb import VERSION
@ -1274,6 +1278,8 @@ class DebuggerUI(FrameVarInfoKeeper):
"look familiar.\n\n"
"If you're new here, welcome! The help screen (invoked by hitting "
"'?' 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"
"- Add support for BPython as a shell.\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,
self._format_fname(code.co_filename), lineno)
from pudb import CONFIG
frame_uis = [make_frame_ui(fl) for fl in self.debugger.stack]
if CONFIG["current_stack_frame"] == "top":
frame_uis = frame_uis[::-1]

View File

@ -32,7 +32,7 @@ class SourceLine(urwid.FlowWidget):
return 1
def render(self, (maxcol,), focus=False):
from pudb import CONFIG
from pudb.debugger import CONFIG
render_line_nr = CONFIG["line_numbers"]
hscroll = self.dbg_ui.source_hscroll_start

View File

@ -9,7 +9,7 @@ try:
except ImportError:
HAVE_NUMPY = 0
from pudb import CONFIG
from pudb.debugger import CONFIG
# data ------------------------------------------------------------------------
class FrameVarInfo(object):