Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Unified Diff: media/tools/constrained_network_server/cns.py

Issue 9125022: Add root access check to cns server. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Edit error msg. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/tools/constrained_network_server/cns.py
diff --git a/media/tools/constrained_network_server/cns.py b/media/tools/constrained_network_server/cns.py
index 5b9ff516bece5545a96e9fdd2380ea6140461668..9f6c1a0d73bf18c29a04111e81a5449dd9695805 100755
--- a/media/tools/constrained_network_server/cns.py
+++ b/media/tools/constrained_network_server/cns.py
@@ -327,6 +327,12 @@ def Main():
"""Configure and start the ConstrainedNetworkServer."""
options = ParseArgs()
+ try:
+ traffic_control.CheckRequirements()
+ except traffic_control.TrafficControlError as e:
+ cherrypy.log(e.msg)
+ return
+
cherrypy.config.update(
{'server.socket_host': '::', 'server.socket_port': options.port})

Powered by Google App Engine
This is Rietveld 408576698