Ticket #11016: managepath.2.diff

File managepath.2.diff, 633 bytes (added by icyhandofcrap, 16 years ago)
  • core/management/__init__.py

     
    5050    try:
    5151        f, path, descr = imp.find_module(part,path)
    5252    except ImportError,e:
    53         if os.path.basename(os.getcwd()) != part:
     53        name = os.readlink(sys.argv[0]) if os.path.islink(sys.argv[0]) else sys.argv[0]
     54        (head, tail) = os.path.split(os.path.abspath(name))
     55        base = os.path.basename(head)
     56        if os.path.basename(head) != part:
    5457            raise e
    5558
    5659    while parts:
Back to Top