Skip to content

Commit

Permalink
another case that can be none
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Aug 25, 2023
1 parent a88206e commit 652652d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spinn_utilities/socket_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from spinn_utilities.config_holder import get_config_int, get_config_str
from spinn_utilities.config_holder import (
get_config_int, get_config_int_or_none, get_config_str)


class SocketAddress(object):
Expand Down Expand Up @@ -50,7 +51,7 @@ def __init__(self, notify_host_name=None, notify_port_no=None,
else:
notify_host_name = str(notify_host_name)
if listen_port is None:
listen_port = get_config_int("Database", "listen_port")
listen_port = get_config_int_or_none("Database", "listen_port")
else:
listen_port = int(listen_port)
self._notify_host_name = notify_host_name
Expand Down

0 comments on commit 652652d

Please sign in to comment.