diff options
author | Chris Lumens <clumens@redhat.com> | 2008-12-05 14:38:33 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2008-12-05 15:33:17 -0500 |
commit | ed0a956f8960f21cc6958f7b1b0061e2b3c8e2c6 (patch) | |
tree | 8d690418c0cf3eabc59337775226fbe05284bcaf | |
parent | c36ab0763982fb504a64b0c69839d982fa646eeb (diff) | |
download | anaconda-ed0a956f8960f21cc6958f7b1b0061e2b3c8e2c6.tar.gz anaconda-ed0a956f8960f21cc6958f7b1b0061e2b3c8e2c6.tar.xz anaconda-ed0a956f8960f21cc6958f7b1b0061e2b3c8e2c6.zip |
Move strip_markup() into iutil.
-rw-r--r-- | iutil.py | 16 | ||||
-rw-r--r-- | textw/progress_text.py | 17 |
2 files changed, 17 insertions, 16 deletions
@@ -608,3 +608,19 @@ def isConsoleOnVirtualTerminal(): if isS390(): return False return not flags.serial + +def strip_markup(text): + if text.find("<") == -1: + return text + r = "" + inTag = False + for c in text: + if c == ">" and inTag: + inTag = False + continue + elif c == "<" and not inTag: + inTag = True + continue + elif not inTag: + r += c + return r.encode("utf-8") diff --git a/textw/progress_text.py b/textw/progress_text.py index af53a11a3..c2d10edf8 100644 --- a/textw/progress_text.py +++ b/textw/progress_text.py @@ -21,6 +21,7 @@ from constants import * from snack import * from constants_text import * +from iutil import strip_markup import gettext _ = lambda x: gettext.ldgettext("anaconda", x) @@ -28,22 +29,6 @@ _ = lambda x: gettext.ldgettext("anaconda", x) import logging log = logging.getLogger("anaconda") -def strip_markup(text): - if text.find("<") == -1: - return text - r = "" - inTag = False - for c in text: - if c == ">" and inTag: - inTag = False - continue - elif c == "<" and not inTag: - inTag = True - continue - elif not inTag: - r += c - return r.encode("utf-8") - class InstallProgressWindow: def __init__(self, screen): self.screen = screen |