The '/usr/bin/python' of some platform like Archlinux is actually python3.
Currently none of our python codes is tested on python3, hence forcing to use
python2.
Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/nstor/nstor_lsmplugin | 2 +-
plugin/ontap/ontap_lsmplugin | 4 ++--
plugin/sim/sim_lsmplugin | 4 ++--
plugin/smispy/smispy_lsmplugin | 4 ++--
plugin/targetd/targetd.py | 2 --
plugin/targetd/targetd_lsmplugin | 4 ++--
test/cmdtest.py | 2 +-
test/plugin_test.py | 2 +-
test/webtest/test_automated.py | 2 +-
test/webtest/test_hardware.py | 2 +-
test/webtest/test_results.py | 2 +-
tools/lsmcli/lsmcli | 2 +-
tools/netapp/netapp.py | 4 +---
tools/utility/public_symbols.py | 4 ++--
tools/utility/web_cap.py | 2 +-
15 files changed, 19 insertions(+), 23 deletions(-)
diff --git a/plugin/nstor/nstor_lsmplugin b/plugin/nstor/nstor_lsmplugin
index c62bae6..82c3171 100755
--- a/plugin/nstor/nstor_lsmplugin
+++ b/plugin/nstor/nstor_lsmplugin
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
#
# Copyright (C) 2012 Nexenta Systems, Inc.
diff --git a/plugin/ontap/ontap_lsmplugin b/plugin/ontap/ontap_lsmplugin
index 6ef4dc4..396106c 100755
--- a/plugin/ontap/ontap_lsmplugin
+++ b/plugin/ontap/ontap_lsmplugin
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (C) 2011-2013 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
@@ -34,4 +34,4 @@ except Exception:
msg = str(traceback.format_exc())
syslog.syslog(syslog.LOG_ERR, msg)
sys.stderr.write(msg)
- sys.exit(1)
\ No newline at end of file
+ sys.exit(1)
diff --git a/plugin/sim/sim_lsmplugin b/plugin/sim/sim_lsmplugin
index ef9e477..9a7aa1d 100755
--- a/plugin/sim/sim_lsmplugin
+++ b/plugin/sim/sim_lsmplugin
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (C) 2011-2013 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
@@ -34,4 +34,4 @@ except Exception:
msg = str(traceback.format_exc())
syslog.syslog(syslog.LOG_ERR, msg)
sys.stderr.write(msg)
- sys.exit(1)
\ No newline at end of file
+ sys.exit(1)
diff --git a/plugin/smispy/smispy_lsmplugin b/plugin/smispy/smispy_lsmplugin
index 13ecfc2..de87c7d 100755
--- a/plugin/smispy/smispy_lsmplugin
+++ b/plugin/smispy/smispy_lsmplugin
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (C) 2011-2013 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
@@ -34,4 +34,4 @@ except Exception:
msg = str(traceback.format_exc())
syslog.syslog(syslog.LOG_ERR, msg)
sys.stderr.write(msg)
- sys.exit(1)
\ No newline at end of file
+ sys.exit(1)
diff --git a/plugin/targetd/targetd.py b/plugin/targetd/targetd.py
index 9cf763e..9f1cac1 100644
--- a/plugin/targetd/targetd.py
+++ b/plugin/targetd/targetd.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
# Copyright (C) 2011-2014 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/plugin/targetd/targetd_lsmplugin b/plugin/targetd/targetd_lsmplugin
index ef33be0..3a75334 100755
--- a/plugin/targetd/targetd_lsmplugin
+++ b/plugin/targetd/targetd_lsmplugin
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (C) 2011-2013 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
@@ -34,4 +34,4 @@ except Exception:
msg = str(traceback.format_exc())
syslog.syslog(syslog.LOG_ERR, msg)
sys.stderr.write(msg)
- sys.exit(1)
\ No newline at end of file
+ sys.exit(1)
diff --git a/test/cmdtest.py b/test/cmdtest.py
index 408dc10..790fa39 100755
--- a/test/cmdtest.py
+++ b/test/cmdtest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (C) 2011-2014 Red Hat, Inc.
#
diff --git a/test/plugin_test.py b/test/plugin_test.py
index 83f1b3b..88e7988 100755
--- a/test/plugin_test.py
+++ b/test/plugin_test.py
@@ -1,4 +1,4 @@
-#!/bin/env python
+#!/bin/env python2
# Copyright (C) 2013-2014 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
diff --git a/test/webtest/test_automated.py b/test/webtest/test_automated.py
index 53e99af..f0b5e33 100755
--- a/test/webtest/test_automated.py
+++ b/test/webtest/test_automated.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (C) 2014 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
diff --git a/test/webtest/test_hardware.py b/test/webtest/test_hardware.py
index 64f78c3..5550d0d 100755
--- a/test/webtest/test_hardware.py
+++ b/test/webtest/test_hardware.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (C) 2014 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
diff --git a/test/webtest/test_results.py b/test/webtest/test_results.py
index 64f7d2e..2b2c527 100755
--- a/test/webtest/test_results.py
+++ b/test/webtest/test_results.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (C) 2014 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
diff --git a/tools/lsmcli/lsmcli b/tools/lsmcli/lsmcli
index d626b99..6baa2df 100755
--- a/tools/lsmcli/lsmcli
+++ b/tools/lsmcli/lsmcli
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (C) 2012 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
diff --git a/tools/netapp/netapp.py b/tools/netapp/netapp.py
index c86a50f..a219a28 100755
--- a/tools/netapp/netapp.py
+++ b/tools/netapp/netapp.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
# Copyright (C) 2012-2014 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -75,4 +73,4 @@ if __name__ == '__main__':
else:
print 'Please create environmental variables for ' \
'NA_USER and NA_PASSWORD'
- sys.exit(1)
\ No newline at end of file
+ sys.exit(1)
diff --git a/tools/utility/public_symbols.py b/tools/utility/public_symbols.py
index dfc597c..e030f0a 100755
--- a/tools/utility/public_symbols.py
+++ b/tools/utility/public_symbols.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (C) 2014 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
@@ -117,4 +117,4 @@ def h_module(mod):
h_module(m[1])
if __name__ == '__main__':
- h_module(lsm)
\ No newline at end of file
+ h_module(lsm)
diff --git a/tools/utility/web_cap.py b/tools/utility/web_cap.py
index b9d5af3..e4740e3 100755
--- a/tools/utility/web_cap.py
+++ b/tools/utility/web_cap.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (C) 2011-2013 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
--
2.0.4