Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: filters/domain.py

Issue 29874607: Issue 6769 - Avoid hardcoding the URL (Closed)
Patch Set: Created Sept. 4, 2018, 4:23 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « README.md ('k') | filters/strip_proto.py » ('j') | templates/plaintext.tmpl » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: filters/domain.py
diff --git a/filters/domain.py b/filters/domain.py
new file mode 100644
index 0000000000000000000000000000000000000000..71a7dc9a271b33207a786216380af96f6b77cfb1
--- /dev/null
+++ b/filters/domain.py
@@ -0,0 +1,4 @@
+import urlparse
+
+def domain(url):
+ return urlparse.urlsplit(url).netloc.split(":")[0]
« no previous file with comments | « README.md ('k') | filters/strip_proto.py » ('j') | templates/plaintext.tmpl » ('J')

Powered by Google App Engine
This is Rietveld