Commit c3267077 authored by Daniel Scheffler's avatar Daniel Scheffler

Fixed AssertionError in case GeoArray is instanced with a file from disk...

Fixed AssertionError in case GeoArray is instanced with a file from disk without map information and projection is set afterwards.
parent 4f79c48e
Pipeline #3581 failed with stages
in 46 seconds
......@@ -50,8 +50,8 @@ clean-test: ## remove test and coverage artifacts
rm -fr nosetests.xml
lint: ## check style with flake8
flake8 --max-line-length=120 geoarray tests > ./tests/linting/flake8.log
pycodestyle geoarray --exclude="*.ipynb,*.ipynb*" --max-line-length=120 > ./tests/linting/pycodestyle.log
flake8 --max-line-length=120 geoarray tests > ./tests/linting/flake8.log
pycodestyle geoarray --exclude="*.ipynb,*.ipynb*" --max-line-length=120 > ./tests/linting/pycodestyle.log
-pydocstyle geoarray > ./tests/linting/pydocstyle.log
test: ## run tests quickly with the default Python
......
......@@ -306,7 +306,7 @@ class GeoArray(object):
@projection.setter
def projection(self, prj):
# type: (str) -> None
if self.filePath:
if self.filePath and self.projection:
assert self.projection is None or prj_equal(self.projection, prj), \
"Cannot set %s.projection to the given value because it does not match the projection from the file " \
"on disk." % self.__class__.__name__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment