Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(11)

Unified Diff: python/utilities.py

Issue 573340043: Run 2to3 --write --nobackups . (Closed)
Patch Set: Remove coverage.py Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « python/safeeval.py ('k') | scripts/abc2ly.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: python/utilities.py
diff --git a/python/utilities.py b/python/utilities.py
index e124539d3bf2b6ecfe5e0c136d9a73ce2da72758..061257b58c51c0b4185d73e54d731584559862d4 100644
--- a/python/utilities.py
+++ b/python/utilities.py
@@ -16,7 +16,7 @@ def string_to_integer(s):
def escape_ly_output_string (input_string):
return_string = input_string
- needs_quotes = not re.match (u"^[a-zA-ZäöüÜÄÖßñ]*$", return_string);
+ needs_quotes = not re.match ("^[a-zA-ZäöüÜÄÖßñ]*$", return_string);
if needs_quotes:
return_string = "\"" + return_string.replace ("\"", "\\\"") + "\""
return return_string
@@ -58,12 +58,12 @@ def hex_to_color(hex_val):
hex_val,
re.IGNORECASE)
if res:
- return map(lambda x: hexcolorval_to_nr (x), res.group (2, 3, 4))
+ return [hexcolorval_to_nr (x) for x in res.group (2, 3, 4)]
else:
return None
def split_string_and_preserve_doublequoted_substrings(value):
- if isinstance(value, unicode):
+ if isinstance(value, str):
value = value.encode('utf-8')
import shlex
lex = shlex.shlex(value)
« no previous file with comments | « python/safeeval.py ('k') | scripts/abc2ly.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b