summaryrefslogtreecommitdiffstats
path: root/exception.py
diff options
context:
space:
mode:
authorJán ONDREJ <ondrejj@salstar.sk>2008-06-04 06:38:02 +0000
committerJán ONDREJ <ondrejj@salstar.sk>2008-06-04 06:38:02 +0000
commit96d7f3e7e678a8ac9919ce628c2f792d4cb57955 (patch)
tree71d6ba7f9e48f87f90a8f8d5c8937c229913d6c5 /exception.py
parente772036e9972589c7808428c9fd00b90b2089a66 (diff)
downloadanaconda-96d7f3e7e678a8ac9919ce628c2f792d4cb57955.tar.gz
anaconda-96d7f3e7e678a8ac9919ce628c2f792d4cb57955.tar.xz
anaconda-96d7f3e7e678a8ac9919ce628c2f792d4cb57955.zip
2008-06-04 Ján ONDREJ <ondrejj@salstar.sk> (via ondrejj@fedoraproject.org)
* po/sk.po: Typo fix.
Diffstat (limited to 'exception.py')
-rw-r--r--exception.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/exception.py b/exception.py
index 080a60647..86ff6c9cb 100644
--- a/exception.py
+++ b/exception.py
@@ -33,19 +33,19 @@ import iutil
import types
import bdb
import partedUtils
-import rhpl
from string import joinfields
from cPickle import Pickler
-from rhpl.translate import _
from flags import flags
import kickstart
+import gettext
+_ = lambda x: gettext.ldgettext("anaconda", x)
+
import logging
log = logging.getLogger("anaconda")
dumpHash = {}
-# XXX do length limits on obj dumps.
def dumpClass(instance, fd, level=0, parentkey="", skipList=[]):
# protect from loops
try:
@@ -86,10 +86,12 @@ def dumpClass(instance, fd, level=0, parentkey="", skipList=[]):
fd.write(", ")
else:
first = 0
+
if type(item) == types.InstanceType:
dumpClass(item, fd, level + 1, skipList=skipList)
else:
- fd.write("%s" % (item,))
+ s = str(item)
+ fd.write("%s" % s[:1024])
fd.write("]\n")
elif type(value) == types.DictType:
fd.write("%s%s: {" % (pad, curkey))
@@ -99,20 +101,24 @@ def dumpClass(instance, fd, level=0, parentkey="", skipList=[]):
fd.write(", ")
else:
first = 0
+
if type(k) == types.StringType:
fd.write("'%s': " % (k,))
else:
fd.write("%s: " % (k,))
+
if type(v) == types.InstanceType:
dumpClass(v, fd, level + 1, parentkey = curkey, skipList=skipList)
else:
- fd.write("%s" % (v,))
+ s = str(v)
+ fd.write("%s" % s[:1024])
fd.write("}\n")
elif type(value) == types.InstanceType:
fd.write("%s%s: " % (pad, curkey))
dumpClass(value, fd, level + 1, parentkey=curkey, skipList=skipList)
else:
- fd.write("%s%s: %s\n" % (pad, curkey, value))
+ s = str(value)
+ fd.write("%s%s: %s\n" % (pad, curkey, s[:1024]))
def dumpException(out, text, tb, anaconda):
skipList = [ "anaconda.backend.ayum",
@@ -135,8 +141,6 @@ def dumpException(out, text, tb, anaconda):
"anaconda.id.keyboard.modelDict",
"anaconda.id.rootPassword",
"anaconda.id.tmpData",
- "anaconda.id.xsetup.xserver.hwstate.monitor.monlist",
- "anaconda.id.xsetup.xserver.hwstate.monitor.monids",
"anaconda.intf.icw.buff",
"anaconda.intf.icw.stockButtons",
"dispatch.sack.excludes",