GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — only call load_source if path is a file · justuni/java2python@2e92c6e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • java2python/config
    • __init__.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎java2python/config/__init__.py‎

Copy file name to clipboardExpand all lines: java2python/config/__init__.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def last(self, key, default=None):
2727
@staticmethod
2828
def load(name):
2929
""" Imports and returns a module from dotted form or filename. """
30-
if path.exists(name):
30+
if path.exists(name) and path.isfile(name):
3131
mod = load_source(str(hash(name)), name)
3232
else:
3333
mod = reduce(getattr, name.split('.')[1:], __import__(name))

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.