summaryrefslogtreecommitdiffstats
path: root/glances/__main__.py
diff options
context:
space:
mode:
authorAlessio Sergi <al3hex@gmail.com>2016-06-02 21:16:52 +0200
committerAlessio Sergi <al3hex@gmail.com>2016-06-02 21:16:52 +0200
commit8da470b7f8e87535d8aa7e14e9b2babef3fcb0e3 (patch)
tree5e7fe701c768cb7ed29451bb447fcf4564a01f29 /glances/__main__.py
parentcb27f0c7344760afa03c4994ddae96a727253558 (diff)
Remove trick to allow glances/__main__.py to be called directly (needed for Python 2.6)
Diffstat (limited to 'glances/__main__.py')
-rw-r--r--glances/__main__.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/glances/__main__.py b/glances/__main__.py
index 0568476d..70465bba 100644
--- a/glances/__main__.py
+++ b/glances/__main__.py
@@ -18,21 +18,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-"""Allow user to run Glances as a module from a dir or zip file."""
+"""Allow user to run Glances as a module."""
# Execute with:
-# $ python glances/__main__.py (2.6)
-# $ python -m glances (2.7+)
+# $ python -m glances (2.7+)
-import sys
-
-if __package__ is None and not hasattr(sys, "frozen"):
- # It is a direct call to __main__.py
- import os.path
- path = os.path.realpath(os.path.abspath(__file__))
- sys.path.insert(0, os.path.dirname(os.path.dirname(path)))
-
-import glances # noqa
+import glances
if __name__ == '__main__':
glances.main()