From f66c2996b45eb6c89f2e0c90d672d2194b57218f Mon Sep 17 00:00:00 2001 From: Mike Fienen Date: Fri, 7 Jun 2019 06:52:07 -0600 Subject: [PATCH 1/2] suppressing error when proj4_str is None --- flopy/utils/reference.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flopy/utils/reference.py b/flopy/utils/reference.py index 2b387faef2..fa302d67fb 100755 --- a/flopy/utils/reference.py +++ b/flopy/utils/reference.py @@ -282,7 +282,8 @@ def _parse_units_from_proj4(self): units = "feet" return units except: - print(' could not parse units from {}'.format(self.proj4_str)) + if self.proj4_str is not None: + print(' could not parse units from {}'.format(self.proj4_str)) @property def units(self): From 502838222550294f9279b8ac27fbf44ec851851f Mon Sep 17 00:00:00 2001 From: Mike Fienen Date: Fri, 7 Jun 2019 11:47:35 -0600 Subject: [PATCH 2/2] fixed long line to molify Codacy --- flopy/utils/reference.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flopy/utils/reference.py b/flopy/utils/reference.py index fa302d67fb..3fc657c7ed 100755 --- a/flopy/utils/reference.py +++ b/flopy/utils/reference.py @@ -283,7 +283,8 @@ def _parse_units_from_proj4(self): return units except: if self.proj4_str is not None: - print(' could not parse units from {}'.format(self.proj4_str)) + print(' could not parse units from {}'.format( + self.proj4_str)) @property def units(self):