Skip to content

Commit a33f66b

Browse files
committed
Merged back production changes to two scripts indirectly called by /a/www/www6s/scripts/run-ietf-report, through /a/www/www6s/scripts/run-report.
- Legacy-Id: 17371
1 parent a2318d9 commit a33f66b

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

ietf/bin/report_id_activity

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,20 @@
33
# -*- Python -*-
44
#
55

6+
# This script requires that the proper virtual python environment has been
7+
# invoked before start
8+
69
# Set PYTHONPATH and load environment variables for standalone script -----------------
710
import os, sys
811
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
912
sys.path = [ basedir ] + sys.path
1013
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
1114

12-
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
13-
if os.path.exists(virtualenv_activation):
14-
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
15-
1615
import django
1716
django.setup()
1817
# -------------------------------------------------------------------------------------
1918

2019
from ietf.secr.drafts.reports import report_id_activity
2120

22-
print report_id_activity(sys.argv[1], sys.argv[2]),
21+
print(report_id_activity(sys.argv[1], sys.argv[2]), end='')
2322

ietf/bin/report_progress_report

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
# -*- Python -*-
44
#
55

6+
# This script requires that the proper virtual python environment has been
7+
# invoked before start
8+
69
# Set PYTHONPATH and load environment variables for standalone script -----------------
710
import os, sys
811
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
912
sys.path = [ basedir ] + sys.path
1013
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
1114

12-
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
13-
if os.path.exists(virtualenv_activation):
14-
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
15-
1615
import django
1716
django.setup()
1817
# -------------------------------------------------------------------------------------
@@ -21,6 +20,5 @@ from ietf.secr.drafts.reports import report_progress_report
2120

2221
# handle unicode characters before attempting to print
2322
output = report_progress_report(sys.argv[1], sys.argv[2])
24-
output = output.replace(unichr(160),' ') # replace NO-BREAK SPACE with space
25-
output = output.encode('ascii','replace')
26-
print output,
23+
output = output.replace(chr(160),' ') # replace NO-BREAK SPACE with space
24+
print(output, end='')

0 commit comments

Comments
 (0)