Index: third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom/generate/generator.py |
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom/generate/generator.py b/third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom/generate/generator.py |
index 401c399e9e62afd9e54de5196d85ea5eb3f97a9c..af14ead8cbc2c8c110467bffb28d101dc3866204 100644 |
--- a/third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom/generate/generator.py |
+++ b/third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom/generate/generator.py |
@@ -9,7 +9,6 @@ import os.path |
import re |
import module as mojom |
-import mojom.fileutil as fileutil |
import pack |
def GetStructFromMethod(method): |
@@ -51,7 +50,8 @@ def CamelCaseToAllCaps(camel_case): |
def WriteFile(contents, full_path): |
# Make sure the containing directory exists. |
full_dir = os.path.dirname(full_path) |
- fileutil.EnsureDirectoryExists(full_dir) |
+ if not os.path.exists(full_dir): |
+ os.makedirs(full_dir) |
# Dump the data to disk. |
with open(full_path, "w+") as f: |