Skip to content

Commit fe2de90

Browse files
committed
Blackened
1 parent 0605bdd commit fe2de90

3 files changed

Lines changed: 30 additions & 30 deletions

File tree

libloader/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from .libloader import *
22

33
__version__ = 0.21
4-
__author__ = 'Christopher Toth'
5-
__author_email__ = '<q@q-continuum.net>'
4+
__author__ = "Christopher Toth"
5+
__author_email__ = "<q@q-continuum.net>"
66
__doc__ = """
77
Quickly and easily load shared libraries from various platforms. Also includes a libloader.com module for loading com modules on Windows.
88
"""

libloader/com.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
from pywintypes import com_error
22
from win32com.client import gencache
33

4+
45
def prepare_gencache():
5-
gencache.is_readonly = False
6-
gencache.GetGeneratePath()
6+
gencache.is_readonly = False
7+
gencache.GetGeneratePath()
78

89

910
def load_com(*names):
10-
if gencache.is_readonly:
11-
prepare_gencache()
12-
result = None
13-
for name in names:
14-
try:
15-
result = gencache.EnsureDispatch(name)
16-
break
17-
except com_error:
18-
continue
19-
if result is None:
20-
raise com_error("Unable to load any of the provided com objects.")
21-
return result
22-
11+
if gencache.is_readonly:
12+
prepare_gencache()
13+
result = None
14+
for name in names:
15+
try:
16+
result = gencache.EnsureDispatch(name)
17+
break
18+
except com_error:
19+
continue
20+
if result is None:
21+
raise com_error("Unable to load any of the provided com objects.")
22+
return result

setup.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
from libloader import __author__, __author_email__, __doc__, __version__
33

44
setup(
5-
name = 'libloader',
6-
version = __version__,
7-
author = __author__,
8-
author_email = __author_email__,
9-
description = __doc__,
10-
packages = find_packages(),
11-
zip_safe = False,
12-
classifiers = [
13-
'Development Status :: 3 - Alpha',
14-
'Intended Audience :: Developers',
15-
'Programming Language :: Python',
16-
'Topic :: Software Development :: Libraries',
17-
],
5+
name="libloader",
6+
version=__version__,
7+
author=__author__,
8+
author_email=__author_email__,
9+
description=__doc__,
10+
packages=find_packages(),
11+
zip_safe=False,
12+
classifiers=[
13+
"Development Status :: 3 - Alpha",
14+
"Intended Audience :: Developers",
15+
"Programming Language :: Python",
16+
"Topic :: Software Development :: Libraries",
17+
],
1818
)

0 commit comments

Comments
 (0)