MJL85 / natlas

natlas - Network Discovery and Auto-Diagramming
GNU General Public License v2.0
523 stars 114 forks source link

Use /usr/bin/env python instead of /usr/bin/python in the shebang #9

Open ghost opened 9 years ago

ghost commented 9 years ago

Hi,

If you use /usr/bin/env python instead of /usr/bin/python in the shebang line for each of your source files, this script will be a bit more portable. Specifically, it will work properly if someone tries to wrap it in a virtualenv, like I did :)

Here's the super simple .diff that worked for me

diff --git a/mnetsuite/graph.py b/mnetsuite/graph.py
index fd00566..e7a35ee 100755
--- a/mnetsuite/graph.py
+++ b/mnetsuite/graph.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python

 '''
        MNet Suite
diff --git a/mnetsuite/node.py b/mnetsuite/node.py
index a8a7566..f8d46e6 100755
--- a/mnetsuite/node.py
+++ b/mnetsuite/node.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python

 '''
        MNet Suite
diff --git a/mnetsuite/snmp.py b/mnetsuite/snmp.py
index 31a4d49..efd2071 100755
--- a/mnetsuite/snmp.py
+++ b/mnetsuite/snmp.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python

 '''
        MNet Suite

Thanks!

CalebFenton commented 6 years ago

This is (partially) fixed here https://github.com/MJL85/natlas/pull/25