Skip to content

Commit

Permalink
- patch: boolean string properties checks are wrong on "output_file_p…
Browse files Browse the repository at this point in the history
…arameter"
  • Loading branch information
afabiani committed Sep 28, 2018
1 parent 55d55fb commit 653fad3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -33,7 +33,7 @@

setup(
name = "wps-remote",
version = "2.14.4",
version = "2.14.5",
author = "GeoServer Developers",
author_email = "geoserver-devel@lists.sourceforge.net",
description = "A library that allows users to publish their executables as GeoServer WPS Processes through the XMPP protocol",
Expand Down
18 changes: 9 additions & 9 deletions src/wpsremote/output_file_parameter.py
Expand Up @@ -66,7 +66,7 @@ def as_json_string(self):
return json.dumps(res)

def get_value(self):
if self._backup_on_wps_execution_shared_dir != None and self._backup_on_wps_execution_shared_dir.lower() is "true" and self._wps_execution_shared_dir != None:
if self._backup_on_wps_execution_shared_dir != None and self._backup_on_wps_execution_shared_dir.lower() == "true" and self._wps_execution_shared_dir != None:
unique_dirname = str(uuid.uuid4())
bkp_dir = path.path(self._wps_execution_shared_dir + "/" + unique_dirname)
bkp_dir.makedirs()
Expand All @@ -76,7 +76,7 @@ def get_value(self):
dst = path.path(dst)

return dst.text()
elif self._upload_data != None and self._upload_data.lower() is "true" and self._uploader != None:
elif self._upload_data != None and self._upload_data.lower() == "true" and self._uploader != None:
unique_dirname = str(uuid.uuid4())
bkp_dir = path.path(tempfile.gettempdir() + '/' + unique_dirname)
bkp_dir.makedirs()
Expand Down Expand Up @@ -107,7 +107,7 @@ def get_output_mime_type(self):
return self._output_mime_type

def is_publish_as_layer(self):
return (self._publish_as_layer != None and self._publish_as_layer.lower() is "true")
return (self._publish_as_layer != None and self._publish_as_layer.lower() == "true")

def get_publish_layer_name(self):
return self._publish_layer_name
Expand Down Expand Up @@ -178,7 +178,7 @@ def as_json_string(self):
return json.dumps(res)

def get_value(self):
if self._backup_on_wps_execution_shared_dir != None and self._backup_on_wps_execution_shared_dir.lower() is "true" and self._wps_execution_shared_dir != None:
if self._backup_on_wps_execution_shared_dir != None and self._backup_on_wps_execution_shared_dir.lower() == "true" and self._wps_execution_shared_dir != None:
unique_dirname = str(uuid.uuid4())
bkp_dir = path.path(self._wps_execution_shared_dir + "/" + unique_dirname)
bkp_dir.makedirs()
Expand All @@ -188,7 +188,7 @@ def get_value(self):
dst = path.path(dst)

return dst
elif self._upload_data != None and self._upload_data.lower() is "true" and self._uploader != None:
elif self._upload_data != None and self._upload_data.lower() == "true" and self._uploader != None:
unique_dirname = str(uuid.uuid4())

if self._upload_data_root:
Expand All @@ -215,7 +215,7 @@ def get_output_mime_type(self):
return self._output_mime_type

def is_publish_as_layer(self):
return (self._publish_as_layer != None and self._publish_as_layer.lower() is "true")
return (self._publish_as_layer != None and self._publish_as_layer.lower() == "true")

def get_publish_layer_name(self):
return self._publish_layer_name
Expand Down Expand Up @@ -307,7 +307,7 @@ def as_json_string(self):
return json.dumps(res)

def get_value(self):
if self._backup_on_wps_execution_shared_dir != None and self._backup_on_wps_execution_shared_dir.lower() is "true" and self._wps_execution_shared_dir != None:
if self._backup_on_wps_execution_shared_dir != None and self._backup_on_wps_execution_shared_dir.lower() == "true" and self._wps_execution_shared_dir != None:
unique_dirname = str(uuid.uuid4())
bkp_dir = path.path(self._wps_execution_shared_dir + "/" + unique_dirname)
bkp_dir.makedirs()
Expand All @@ -326,7 +326,7 @@ def get_value(self):
files_to_publish = files_to_publish + dst.abspath()

return files_to_publish
elif self._upload_data != None and self._upload_data.lower() is "true" and self._uploader != None:
elif self._upload_data != None and self._upload_data.lower() == "true" and self._uploader != None:
unique_dirname = str(uuid.uuid4())
bkp_dir = path.path(tempfile.gettempdir() + '/' + unique_dirname)
bkp_dir.makedirs()
Expand Down Expand Up @@ -366,7 +366,7 @@ def get_output_mime_type(self):
return self._output_mime_type

def is_publish_as_layer(self):
return (self._publish_as_layer != None and self._publish_as_layer.lower() is "true")
return (self._publish_as_layer != None and self._publish_as_layer.lower() == "true")

def get_publish_layer_name(self):
return self._publish_layer_name
Expand Down

0 comments on commit 653fad3

Please sign in to comment.