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

Unified Diff: tools/telemetry/build/update_docs.py

Issue 17734002: [telemetry] Small fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: If we removed .pyc files, check if we can remove the entire directory. Created 7 years, 6 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
« no previous file with comments | « no previous file | tools/telemetry/docs/telemetry.core.platform.profiler.perf_profiler.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/build/update_docs.py
diff --git a/tools/telemetry/build/update_docs.py b/tools/telemetry/build/update_docs.py
index 38d0c3c1782cc4de38957afec4f65ef78c13bfab..cae96e631264d38741ff890b3f9fb660b8d7321a 100644
--- a/tools/telemetry/build/update_docs.py
+++ b/tools/telemetry/build/update_docs.py
@@ -32,6 +32,9 @@ def RemoveAllStalePycFiles():
py_path = os.path.splitext(pyc_path)[0] + '.py'
if not os.path.exists(py_path):
os.remove(pyc_path)
+ pyc_dir = os.path.dirname(pyc_path)
+ if not os.listdir(pyc_dir):
+ os.removedirs(pyc_dir)
def GenerateHTMLForModule(module):
html = pydoc.html.page(pydoc.describe(module),
« no previous file with comments | « no previous file | tools/telemetry/docs/telemetry.core.platform.profiler.perf_profiler.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698