Skip to content

Commit

Permalink
Enabling DeprecationWarning by default
Browse files Browse the repository at this point in the history
Fixed bug due to deprecated "output" parameter
  • Loading branch information
niermann committed May 24, 2018
1 parent 4bebe17 commit 8032166
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion holoaverage/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def holoaverage(param, basepath="", verbose=0):
output_aligned = bool(param.get('output_aligned', False))
if ('output_name' not in param) and ('output' in param):
warnings.warn("The parameter 'output' is deprecated. Use 'output_name' instead.", DeprecationWarning)
output_name = os.path.join(path, str(param['output_name']))
output_name = os.path.join(path, str(param['output']))
elif 'output_name' in param:
output_name = os.path.join(path, str(param['output_name']))
else:
Expand Down Expand Up @@ -423,9 +423,14 @@ def main(argv=None):
:param argv: Arguments
:returns: Exit code
"""
# Get arguments
if argv is None:
argv = sys.argv

# Enable Deprecation warning by default
if not sys.warnoptions:
warnings.simplefilter("default", category=DeprecationWarning)

arg_index = 1
param_file = None
verbose = 0
Expand Down

0 comments on commit 8032166

Please sign in to comment.