From 46c78a036dec051bb9e6fb75adbf7fcd6a585301 Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Tue, 18 Jul 2017 20:16:34 +0500 Subject: [PATCH] Fix tile_width property in HipsSurveyProperties class --- hips/tiles/surveys.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hips/tiles/surveys.py b/hips/tiles/surveys.py index 28bc65b..f5c462b 100644 --- a/hips/tiles/surveys.py +++ b/hips/tiles/surveys.py @@ -128,7 +128,10 @@ def hips_order(self) -> int: @property def tile_width(self) -> int: """HiPS tile width""" - return int(self.data['hips_tile_width']) or 512 + try: + return int(self.data['hips_tile_width']) + except KeyError: + return 512 @property def tile_format(self) -> str: