Skip to content

Commit

Permalink
add display_warnings #58
Browse files Browse the repository at this point in the history
d = epanet('net2-cl2.inp', display_warnings=True)
d = epanet('net2-cl2.inp', display_warnings=False)
  • Loading branch information
Mariosmsk committed Jul 18, 2024
1 parent 1d76650 commit e416f05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions epyt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
__author__ = """Marios S. Kyriakou"""
__email__ = "[email protected]"
__version__ = "1.1.9"
__version__ = "1.2.0"
__msxversion__ = "200000"
__lastupdate__ = "24/06/2024"
__lastupdate__ = "18/07/2024"
__copyright__ = """Copyright 2022, KIOS Research and Innovation Center of Excellence (KIOS CoE),
University of Cyprus (www.kios.org.cy)."""
__license__ = "EUPL License, Version 1.2"
Expand Down
6 changes: 4 additions & 2 deletions epyt/epanet.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,10 +510,12 @@ class epanet:
d = epanet(inpname, msx=True,customlib=epanetlib)
"""

def __init__(self, *argv, version=2.2, ph=False, loadfile=False, customlib=None, display_msg=True):
def __init__(self, *argv, version=2.2, ph=False, loadfile=False, customlib=None, display_msg=True,
display_warnings=True):
# Constants
self.msx = None
warnings.simplefilter('always')
if display_warnings:
warnings.simplefilter('always') # 'action', "error", "ignore", "always", "default", "module", "once"
# Demand model types. DDA #0 Demand driven analysis,
# PDA #1 Pressure driven analysis.
self.customlib = customlib
Expand Down

0 comments on commit e416f05

Please sign in to comment.