Replace file with open, which is Python 3 compatible

Change-Id: I471ae9b372f88a508d4654b1a18c6da90397a828
This commit is contained in:
Alex Gaynor
2014-02-13 06:57:00 -08:00
parent b8a850c5b3
commit d465d60867
4 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ def get_image_schema():
if IMAGE_SCHEMA is None:
schema_path = expanduser("~/.glanceclient/image_schema.json")
if os.path.exists(schema_path) and os.path.isfile(schema_path):
with file(schema_path, "r") as f:
with open(schema_path, "r") as f:
schema_raw = f.read()
IMAGE_SCHEMA = json.loads(schema_raw)
return IMAGE_SCHEMA