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

Unified Diff: client/dom/scripts/database.py

Issue 9421034: Do not use relative paths in dom scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/scripts/database.py
diff --git a/client/dom/scripts/database.py b/client/dom/scripts/database.py
index 661f868527fb47aec4e4f007798d614970639956..44be932a819d97aebb2abf791bffde7213e1f9be 100755
--- a/client/dom/scripts/database.py
+++ b/client/dom/scripts/database.py
@@ -125,14 +125,14 @@ class Database(object):
def Cache(self):
"""Serialize the database using pickle for faster startup in the future
"""
- output_file = open('../database/cache.pickle', 'wb')
+ output_file = open(os.path.join(self._root_dir, 'cache.pickle'), 'wb')
pickle.dump(self._all_interfaces, output_file)
pickle.dump(self._interfaces_to_delete, output_file)
def LoadFromCache(self):
"""Deserialize the database using pickle for fast startup
"""
- input_file = open('../database/cache.pickle', 'rb')
+ input_file = open(os.path.join(self._root_dir, 'cache.pickle'), 'rb')
self._all_interfaces = pickle.load(input_file)
self._interfaces_to_delete = pickle.load(input_file)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698