Skip to content

Commit

Permalink
Fix bug with order of filesystem checks
Browse files Browse the repository at this point in the history
Also improve namespace for the logging
  • Loading branch information
vvzen committed Jun 26, 2022
1 parent 29b4abf commit 528f893
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/vv_geojson/geo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
logging.StreamHandler()
])

logger = logging.getLogger('geo_utils')
logger = logging.getLogger('vv_geo_utils')


def spherical_to_cartesian(lon, lat, radius):
Expand Down Expand Up @@ -63,15 +63,15 @@ def __init__(self, geo, geojsonpath):
self._geojson_path = geojsonpath
self._radius = 100

if not os.path.exists(geojsonpath):
hou.ui.displayMessage('Please provide a path to an existing file!')
return

if not os.path.isfile(geojsonpath):
hou.ui.displayMessage('Please provide a path to an existing file,'
'not a directory!')
return

if not os.path.exists(geojsonpath):
hou.ui.displayMessage('Please provide a path to an existing file!')
return

with open(geojsonpath) as f:
self.geojson = json.load(f)

Expand Down

0 comments on commit 528f893

Please sign in to comment.