aboutsummaryrefslogtreecommitdiffstats
path: root/bin/acme
diff options
context:
space:
mode:
Diffstat (limited to 'bin/acme')
-rwxr-xr-xbin/acme/srtool_acme.py18
-rwxr-xr-xbin/acme/srtool_defect.py19
-rwxr-xr-xbin/acme/srtool_jira.py3
3 files changed, 12 insertions, 28 deletions
diff --git a/bin/acme/srtool_acme.py b/bin/acme/srtool_acme.py
index b3453dff..0e33de0e 100755
--- a/bin/acme/srtool_acme.py
+++ b/bin/acme/srtool_acme.py
@@ -32,34 +32,23 @@
import os
import sys
-import re
-import csv
-import xml.etree.ElementTree as ET
import argparse
import sqlite3
-import subprocess
import json
-import urllib
-from datetime import datetime
# load the srt.sqlite schema indexes
dir_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sys.path.insert(0, dir_path)
from common.srt_schema import ORM
-from datetime import datetime, date
-from urllib.request import urlopen, URLError
-from urllib.parse import urlparse
-
+# Setup:
+verbose = False
srtDbName = 'srt.sqlite'
-
#################################
# Helper methods
#
-verbose = False
-
def debugMsg(msg):
if verbose:
print(msg)
@@ -153,9 +142,6 @@ def main(argv):
print("Command not found")
if __name__ == '__main__':
- global script_pathname
- global srtool_basepath
-
srtool_scriptpath = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
srtool_basepath = os.path.dirname(srtool_scriptpath)
main(sys.argv[1:])
diff --git a/bin/acme/srtool_defect.py b/bin/acme/srtool_defect.py
index 2cf58375..77f8e030 100755
--- a/bin/acme/srtool_defect.py
+++ b/bin/acme/srtool_defect.py
@@ -21,25 +21,26 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
### Usage Examples (run from top level directory)
-# Updating Defect System Issues: ./bin/acme/srtool_defect.py -U
-
+# Updating Defect System Issues: ./bin/<app>/srtool_defect.py -U
import os
import sys
-import re
-import csv
-import xml.etree.ElementTree as ET
import argparse
import sqlite3
-import subprocess
import json
-from time import sleep
# load the srt.sqlite schema indexes
dir_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sys.path.insert(0, dir_path)
from common.srt_schema import ORM
+# Setup:
+master_log = ''
+force_update = False
+verbose = False
+srt_user = ''
+srt_passwd = ''
+
srtDbName = 'srt.sqlite'
srtErrorLog = 'srt_errors.txt'
@@ -47,8 +48,6 @@ srtErrorLog = 'srt_errors.txt'
# Helper methods
#
-verbose = False
-
def debugMsg(msg):
if verbose:
print(msg)
@@ -296,8 +295,6 @@ def main(argv):
sys.exit("Command '%s' not found" % args.command)
if __name__ == '__main__':
- global srtool_basepath
-
if verbose: print("srtool_defect(%s)" % sys.argv[1:])
# fetch any environment overrides
diff --git a/bin/acme/srtool_jira.py b/bin/acme/srtool_jira.py
index dc72404b..f9b8103b 100755
--- a/bin/acme/srtool_jira.py
+++ b/bin/acme/srtool_jira.py
@@ -54,6 +54,7 @@ dir_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sys.path.insert(0, dir_path)
from common.srt_schema import ORM
+# Setup:
srtDbName = 'srt.sqlite'
srtErrorLog = 'srt_errors.txt'
@@ -556,7 +557,7 @@ def get_jira_er(project_prefix):
#log.write("GETTING ENHANCEMENT REQUESTS FOR " + project_prefix)
print ("GETTING ENHANCEMENT REQUESTS FOR " + project_prefix)
try:
- jira = JIRA(JIRA_PRODUCTION_LINK', auth=(srt_user, srt_passwd))
+ jira = JIRA(JIRA_PRODUCTION_LINK, auth=(srt_user, srt_passwd))
except Exception as e:
print("CONNECTION TO JIRA FAILED")
return