Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
geomag-algorithms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Geomagnetism Program
geomag-algorithms
Commits
bd5aacfd
Commit
bd5aacfd
authored
8 years ago
by
Jeremy M Fee
Browse files
Options
Downloads
Patches
Plain Diff
Print warning when using deprecated arguments
parent
0869f415
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
geomagio/Controller.py
+19
-0
19 additions, 0 deletions
geomagio/Controller.py
with
19 additions
and
0 deletions
geomagio/Controller.py
+
19
−
0
View file @
bd5aacfd
...
@@ -414,53 +414,72 @@ def main(args):
...
@@ -414,53 +414,72 @@ def main(args):
# TODO: remove argument mapping in future version
# TODO: remove argument mapping in future version
# map legacy input arguments
# map legacy input arguments
usingDeprecated
=
False
if
args
.
input_edge
is
not
None
:
if
args
.
input_edge
is
not
None
:
args
.
input
=
'
edge
'
args
.
input
=
'
edge
'
args
.
input_host
=
args
.
input_edge
args
.
input_host
=
args
.
input_edge
args
.
input_port
=
args
.
input_edge_port
args
.
input_port
=
args
.
input_edge_port
usingDeprecated
=
True
elif
args
.
input_iaga_file
is
not
None
:
elif
args
.
input_iaga_file
is
not
None
:
args
.
input
=
'
iaga2002
'
args
.
input
=
'
iaga2002
'
args
.
input_file
=
args
.
input_iaga_file
args
.
input_file
=
args
.
input_iaga_file
usingDeprecated
=
True
elif
args
.
input_iaga_stdin
:
elif
args
.
input_iaga_stdin
:
args
.
input
=
'
iaga2002
'
args
.
input
=
'
iaga2002
'
args
.
input_stdin
=
True
args
.
input_stdin
=
True
usingDeprecated
=
True
elif
args
.
input_iaga_url
is
not
None
:
elif
args
.
input_iaga_url
is
not
None
:
args
.
input
=
'
iaga2002
'
args
.
input
=
'
iaga2002
'
args
.
input_url
=
args
.
input_iaga_url
args
.
input_url
=
args
.
input_iaga_url
usingDeprecated
=
True
elif
args
.
input_imfv283_file
is
not
None
:
elif
args
.
input_imfv283_file
is
not
None
:
args
.
input
=
'
imfv283
'
args
.
input
=
'
imfv283
'
args
.
input_file
=
args
.
input_imfv283_file
args
.
input_file
=
args
.
input_imfv283_file
usingDeprecated
=
True
elif
args
.
input_imfv283_url
is
not
None
:
elif
args
.
input_imfv283_url
is
not
None
:
args
.
input
=
'
imfv283
'
args
.
input
=
'
imfv283
'
args
.
input_url
=
args
.
input_imfv283_url
args
.
input_url
=
args
.
input_imfv283_url
usingDeprecated
=
True
elif
args
.
input_imfv283_goes
:
elif
args
.
input_imfv283_goes
:
args
.
input
=
'
goes
'
args
.
input
=
'
goes
'
usingDeprecated
=
True
# map legacy output arguments
# map legacy output arguments
if
args
.
output_edge
is
not
None
:
if
args
.
output_edge
is
not
None
:
args
.
output
=
'
edge
'
args
.
output
=
'
edge
'
args
.
output_host
=
args
.
output_edge
args
.
output_host
=
args
.
output_edge
args
.
output_port
=
args
.
edge_write_port
args
.
output_port
=
args
.
edge_write_port
usingDeprecated
=
True
elif
args
.
output_iaga_file
is
not
None
:
elif
args
.
output_iaga_file
is
not
None
:
args
.
output
=
'
iaga2002
'
args
.
output
=
'
iaga2002
'
args
.
output_file
=
args
.
output_iaga_file
args
.
output_file
=
args
.
output_iaga_file
usingDeprecated
=
True
elif
args
.
output_iaga_stdout
:
elif
args
.
output_iaga_stdout
:
args
.
output
=
'
iaga2002
'
args
.
output
=
'
iaga2002
'
args
.
output_stdout
=
True
args
.
output_stdout
=
True
usingDeprecated
=
True
elif
args
.
output_iaga_url
is
not
None
:
elif
args
.
output_iaga_url
is
not
None
:
args
.
output
=
'
iaga2002
'
args
.
output
=
'
iaga2002
'
args
.
output_url
=
args
.
output_iaga_url
args
.
output_url
=
args
.
output_iaga_url
usingDeprecated
=
True
elif
args
.
output_pcdcp_file
is
not
None
:
elif
args
.
output_pcdcp_file
is
not
None
:
args
.
output
=
'
pcdcp
'
args
.
output
=
'
pcdcp
'
args
.
output_file
=
args
.
output_pcdcp_file
args
.
output_file
=
args
.
output_pcdcp_file
usingDeprecated
=
True
elif
args
.
output_pcdcp_stdout
:
elif
args
.
output_pcdcp_stdout
:
args
.
output
=
'
pcdcp
'
args
.
output
=
'
pcdcp
'
args
.
output_stdout
=
True
args
.
output_stdout
=
True
usingDeprecated
=
True
elif
args
.
output_pcdcp_url
is
not
None
:
elif
args
.
output_pcdcp_url
is
not
None
:
args
.
output
=
'
pcdcp
'
args
.
output
=
'
pcdcp
'
args
.
output_url
=
args
.
output_pcdcp_url
args
.
output_url
=
args
.
output_pcdcp_url
usingDeprecated
=
True
elif
args
.
output_plot
:
elif
args
.
output_plot
:
args
.
output
=
'
plot
'
args
.
output
=
'
plot
'
usingDeprecated
=
True
if
usingDeprecated
:
print
>>
sys
.
stderr
,
'
WARNING: you are using deprecated arguments,
'
+
\
'
please update your usage
'
# TODO check for unused arguments.
# TODO check for unused arguments.
# create controller
# create controller
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment