Skip to content
Snippets Groups Projects
Commit 255d13f6 authored by mbruns42's avatar mbruns42
Browse files

Remove getopt and use plain command line option

parent ba61acf7
No related branches found
No related tags found
1 merge request!156Remove getopt and use plain command line option
Pipeline #
import subprocess import subprocess
import sys import sys
import getopt
import os import os
import trafficAnalysis import trafficAnalysis
...@@ -18,8 +17,8 @@ import readFileUtilities ...@@ -18,8 +17,8 @@ import readFileUtilities
# ReportSummary: # ReportSummary:
# #
# Usage: # Usage:
# reportSummary.py -r <reportDirectory> # reportSummary.py <reportDirectory>
# e.g., -r /Simulator/reports/ # e.g., /Simulator/reports/
# #
# 1. Calls all pre-processing perl script on a given report directory # 1. Calls all pre-processing perl script on a given report directory
# The shortened reports are placed within the reports directory # The shortened reports are placed within the reports directory
...@@ -28,20 +27,11 @@ import readFileUtilities ...@@ -28,20 +27,11 @@ import readFileUtilities
# 3. Outputs all images into pdf in consistent order (calls another script that does) # 3. Outputs all images into pdf in consistent order (calls another script that does)
# Retrieve command line options # Get directory containing reports and check if it really exists
relevantOptions = sys.argv[1:] reportDir = sys.argv[1]
# Default values for options if not os.path.isdir(reportDir):
reportDir = 'reports/' print("Report directory not found.")
print("Usage: reportSummary.py <reportDirectory> \n e.g., /Simulator/reports/")
# Try to retrieve command line parameters
try:
opts, args = getopt.getopt(relevantOptions,"r:")
except getopt.GetoptError:
print('Usage: reportSummary.py -r <reportDirectory> \n e.g., -r /Simulator/reports/')
sys.exit(2)
for opt, arg in opts:
if opt == "-r":
reportDir = arg
## Call perl scripts for report pre-processing ## Call perl scripts for report pre-processing
granularity = "300" granularity = "300"
......
  • Contributor

    SonarQube analysis reported no issues.

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment