Skip to content

Commit

Permalink
Fix getting module_name
Browse files Browse the repository at this point in the history
fixed #221

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
  • Loading branch information
miurahr committed Feb 25, 2021
1 parent 2f17a7d commit 740ebbb
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions aqt/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import argparse
import inspect
import logging
import logging.config
import multiprocessing
import os
import pathlib
import platform
import random
import subprocess
Expand All @@ -47,11 +47,6 @@
from aqt.helper import Settings, altlink
from aqt.updater import Updater

try:
from importlib import metadata as importlib_metadata # noqa
except ImportError:
import importlib_metadata


class ExtractionError(Exception):
pass
Expand Down Expand Up @@ -358,8 +353,8 @@ def show_help(self, args):

def show_aqt_version(self):
"""Display version information"""
dist = importlib_metadata.distribution('aqtinstall')
module_name = dist.entry_points[0].name
s = inspect.stack()
module_name = inspect.getmodule(s[0][0]).__name__
py_version = platform.python_version()
py_impl = platform.python_implementation()
py_build = platform.python_compiler()
Expand Down

0 comments on commit 740ebbb

Please sign in to comment.