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

Unified Diff: tools/telemetry/telemetry/page/__init__.py

Issue 838253005: Refactor serving_dirs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: tools/telemetry/telemetry/page/__init__.py
diff --git a/tools/telemetry/telemetry/page/__init__.py b/tools/telemetry/telemetry/page/__init__.py
index e9b897289bc4f7f8ec63cbe04b7581eab2ef2634..aa5f665eeb63204c42a35bdc24da98d65602af5f 100644
--- a/tools/telemetry/telemetry/page/__init__.py
+++ b/tools/telemetry/telemetry/page/__init__.py
@@ -195,6 +195,8 @@ class Page(user_story.UserStory):
@property
def serving_dir(self):
+ if not self.is_file:
+ return None
nednguyen 2015/02/03 01:37:37 Can the logic below be moved to user_story?
aiolos (Not reviewing) 2015/02/03 02:35:36 user_story doesn't currently have a file_path para
nednguyen 2015/02/03 18:03:54 file_path is a field that only works in page's cas
file_path = os.path.realpath(self.file_path)
if os.path.isdir(file_path):
return file_path

Powered by Google App Engine
This is Rietveld 408576698