Skip to content

Commit 528f893

Browse files
committed
Fix bug with order of filesystem checks
Also improve namespace for the logging
1 parent 29b4abf commit 528f893

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/vv_geojson/geo_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
logging.StreamHandler()
1818
])
1919

20-
logger = logging.getLogger('geo_utils')
20+
logger = logging.getLogger('vv_geo_utils')
2121

2222

2323
def spherical_to_cartesian(lon, lat, radius):
@@ -63,15 +63,15 @@ def __init__(self, geo, geojsonpath):
6363
self._geojson_path = geojsonpath
6464
self._radius = 100
6565

66+
if not os.path.exists(geojsonpath):
67+
hou.ui.displayMessage('Please provide a path to an existing file!')
68+
return
69+
6670
if not os.path.isfile(geojsonpath):
6771
hou.ui.displayMessage('Please provide a path to an existing file,'
6872
'not a directory!')
6973
return
7074

71-
if not os.path.exists(geojsonpath):
72-
hou.ui.displayMessage('Please provide a path to an existing file!')
73-
return
74-
7575
with open(geojsonpath) as f:
7676
self.geojson = json.load(f)
7777

0 commit comments

Comments
 (0)