jenkins-bot has submitted this change and it was merged.

Change subject: jsub: guard against PYTHONPATH munging in caller's environment
......................................................................


jsub: guard against PYTHONPATH munging in caller's environment

Use the `-E` and `-s` cli arguments of Python to ignore PYTHONPATH,
PYTHONHOME, and user local package directories when executing.

Note: includes line length changes to prior code to make flake8 happy.

Bug: T147350
Change-Id: Id436ab67e1b2141ca8a4fafcc711cd47cd792cf6
---
M debian/changelog
M jobutils/bin/jsub
2 files changed, 11 insertions(+), 3 deletions(-)

Approvals:
  Yuvipanda: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/debian/changelog b/debian/changelog
index d7ab9a4..4d0cb32 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+toollabs (1.17) unstable; urgency=medium
+
+  * jsub: guard against PYTHONPATH munging in caller's environment
+
+ -- Bryan Davis <bd...@wikimedia.org>  Mon, 21 Nov 2016 23:18:11 +0000
+
 toollabs (1.16) unstable; urgency=medium
 
   * jsub: Change default release from Precise to Trusty
diff --git a/jobutils/bin/jsub b/jobutils/bin/jsub
index 7555ee0..3385b4e 100755
--- a/jobutils/bin/jsub
+++ b/jobutils/bin/jsub
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python2 -E -s
 # -*- coding: utf-8 -*-
 #
 # Submit a job to the job grid.
@@ -614,14 +614,16 @@
         print(
             'WARNING: No `-l release=...` argument provided.'
             '\n\tDefault release has changed from precise to trusty!'
-            
'\n\thttps://wikitech.wikimedia.org/wiki/Tools_Precise_deprecation',
+            '\n\t'
+            'https://wikitech.wikimedia.org/wiki/Tools_Precise_deprecation',
             file=sys.stderr)
         print('*' * 78, file=sys.stderr)
     elif args.release == 'precise':
         print('*' * 78, file=sys.stderr)
         print(
             'NOTICE: Precise hosts are being deprecated from Tool Labs'
-            
'\n\thttps://wikitech.wikimedia.org/wiki/Tools_Precise_deprecation',
+            '\n\t'
+            'https://wikitech.wikimedia.org/wiki/Tools_Precise_deprecation',
             file=sys.stderr)
         print('*' * 78, file=sys.stderr)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/322790
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id436ab67e1b2141ca8a4fafcc711cd47cd792cf6
Gerrit-PatchSet: 2
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Coren <m...@uberbox.org>
Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl>
Gerrit-Reviewer: Yuvipanda <yuvipa...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to