Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
parser.add_argument(
'-f', '--metrics-file',
default='-',
help='File containing metric names to filter, or \'-\' ' +
'to read from STDIN')
args = parser.parse_args()
if args.metrics_file and args.metrics_file[0] != '-':
fi = args.metrics_file
else:
fi = []
try:
for metric in fileinput.input(fi):
deleteMetric(metric, args.trash_dir)
except KeyboardInterrupt:
sys.exit(1)