Chris Lumens wrote:
---
iutil.py | 16 ++++++++++++++++
textw/progress_text.py | 17 +----------------
2 files changed, 17 insertions(+), 16 deletions(-)
Looks good to me.
Regards,
Hans
diff --git a/iutil.py b/iutil.py
index 1982577..a749fc2 100644
--- a/iutil.py
+++ b/iutil.py
@@ -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 af53a11..c2d10ed 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
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list