Skip to content

Commit

Permalink
Support the new kiwi's environment api
Browse files Browse the repository at this point in the history
Change-Id: Ie4b99504d739722827e6d1f58f59f2f03fdb7cb3
  • Loading branch information
bellini666 committed Nov 20, 2014
1 parent 35ded46 commit 8e2025e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,5 @@
license="GNU LGPL 2.1 (see COPYING)",
packages=listpackages('stoqdrivers'),
data_files=[("$datadir/conf", listfiles("stoqdrivers/conf", "*.ini"))],
global_resources=dict(conf="$datadir/conf"),
resources=dict(locale="$prefix/share/locale"),
install_requires=install_requires,
)
2 changes: 0 additions & 2 deletions stoqdrivers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,4 @@
__all__ = ["library"]

library = Library("stoqdrivers", root="..")
if library.uninstalled:
library.add_global_resource("conf", "stoqdrivers/conf")
library.enable_translation()
3 changes: 2 additions & 1 deletion stoqdrivers/printers/cheque.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def get_banks(self):
configfile = self.__module__.split('.')[-2] + '.ini'

config = ConfigParser()
filename = environ.find_resource("conf", configfile)
filename = environ.get_resource_filename('stoqdrivers', 'conf',
configfile)
if not config.read(filename):
return None
for section in config.sections():
Expand Down

0 comments on commit 8e2025e

Please sign in to comment.