Commit 94e1e478 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix getResource when apachedex/__init__.py is invoked directly.

parent 34faec2c
......@@ -1534,4 +1534,11 @@ def main():
)
if __name__ == '__main__':
__resource_base = os.path.join(*os.path.split(__file__)[:-1])
def getResource(name, encoding='utf-8'):
return codecs.open(
os.path.join(__resource_base, name),
encoding=encoding,
).read()
main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment