Merge branch 'main' into avm99963-monorail
Merged commit cd4b3b336f1f14afa02990fdc2eec5d9467a827e
GitOrigin-RevId: e67bbf185d5538e1472bb42e0abb2a141f88bac1
diff --git a/tracker/tracker_helpers.py b/tracker/tracker_helpers.py
index c9f9e5a..cd9acfa 100644
--- a/tracker/tracker_helpers.py
+++ b/tracker/tracker_helpers.py
@@ -17,7 +17,7 @@
import logging
import re
import time
-import urllib
+from six.moves import urllib
from google.appengine.api import app_identity
@@ -151,8 +151,10 @@
comment = post_data.get('comment', '')
is_description = bool(post_data.get('description', ''))
status = post_data.get('status', '')
- template_name = urllib.unquote_plus(post_data.get('template_name', ''))
+ template_name = urllib.parse.unquote_plus(post_data.get('template_name', ''))
component_str = post_data.get('components', '')
+ # TODO: switch when convert /p to flask
+ # label_strs = post_data.getlist('label')
label_strs = post_data.getall('label')
if is_description:
@@ -257,6 +259,8 @@
phase_field_val_strs_remove = collections.defaultdict(dict)
for key in post_data.keys():
if key.startswith(_CUSTOM_FIELD_NAME_PREFIX):
+ # TODO: switch when convert /p to flask
+ # val_strs = [v for v in post_data.getlist(key) if v]
val_strs = [v for v in post_data.getall(key) if v]
if val_strs:
try:
@@ -327,6 +331,8 @@
Returns:
a list of attachment ids for kept attachments
"""
+ # TODO: switch when convert /p to flask
+ # kept_attachments = post_data.getlist('keep-attachment')
kept_attachments = post_data.getall('keep-attachment')
return [int(aid) for aid in kept_attachments]
@@ -616,8 +622,10 @@
url = urls.ISSUE_LIST
kwargs['projects'] = ','.join(sorted(project_names))
- param_strings = ['%s=%s' % (k, urllib.quote((u'%s' % v).encode('utf-8')))
- for k, v in kwargs.items()]
+ param_strings = [
+ '%s=%s' % (k, urllib.parse.quote((u'%s' % v).encode('utf-8')))
+ for k, v in kwargs.items()
+ ]
if param_strings:
url += '?' + '&'.join(sorted(param_strings))
if absolute: