*: Fix some Python 3 incompatibilities
Change-Id: Id324c0c5741e21fcd649b3b95894406808ebd286
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/55920
Reviewed-by: Oliver Newman <olivernewman@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
diff --git a/recipe_modules/roll_util/api.py b/recipe_modules/roll_util/api.py
index bda9d04..1e24588 100644
--- a/recipe_modules/roll_util/api.py
+++ b/recipe_modules/roll_util/api.py
@@ -15,11 +15,11 @@
import pprint
import re
-import urlparse
import attr
import enum
from recipe_engine import recipe_api
+from six.moves import urllib
# If we're embedding the original commit message, prepend 'Original-' to lines
# which begin with these tags.
@@ -237,7 +237,7 @@
@property
def gerrit_name(self):
- return urlparse.urlparse(self.remote).netloc.split('.')[0]
+ return urllib.parse.urlparse(self.remote).netloc.split('.')[0]
@attr.s