summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Weller <ianweller@gmail.com>2008-09-28 22:22:24 -0500
committerIan Weller <ianweller@gmail.com>2008-09-28 22:22:24 -0500
commit98c7dccc32938d3c3066c83bd5498004b68efe4a (patch)
treec154bc755040d0a8868c5f26eccf5cdf40874879
parent7058b164aea952bc97def5efd9c83a2a5aaaf71d (diff)
downloadfedora-business-cards-98c7dccc32938d3c3066c83bd5498004b68efe4a.zip
fedora-business-cards-98c7dccc32938d3c3066c83bd5498004b68efe4a.tar.gz
fedora-business-cards-98c7dccc32938d3c3066c83bd5498004b68efe4a.tar.xz
Fix template thingy
-rw-r--r--fedora_business_cards/config.ini4
-rw-r--r--fedora_business_cards/config.py4
-rw-r--r--fedora_business_cards/frontend.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/fedora_business_cards/config.ini b/fedora_business_cards/config.ini
index eff2723..a8385a4 100644
--- a/fedora_business_cards/config.ini
+++ b/fedora_business_cards/config.ini
@@ -1,3 +1,3 @@
[location]
-; this can be relative to the directory with config.py in it
-templates = ../templates
+; this can be relative to the directory with the fedora-business-cards executable in it
+templates = templates
diff --git a/fedora_business_cards/config.py b/fedora_business_cards/config.py
index 259b4db..3a255fe 100644
--- a/fedora_business_cards/config.py
+++ b/fedora_business_cards/config.py
@@ -26,7 +26,7 @@ import iniparse
import os
# locations, in reverse-order of priority
-LOCATIONS = ['./config.ini',
+LOCATIONS = ['/'.join(__file__.split('/')[:-1]+['config.ini']),
'/usr/share/fedora-business-cards/config.ini',
'/etc/fedora-business-cards.ini',
os.getenv('HOME')+'/.fedora-business-cards.ini']
@@ -35,6 +35,6 @@ parser = iniparse.ConfigParser()
# import the configs
for i in LOCATIONS:
- parser.read(LOCATIONS[i])
+ parser.read(i)
__all__ = ('parser')
diff --git a/fedora_business_cards/frontend.py b/fedora_business_cards/frontend.py
index a3dfdd6..cf162f7 100644
--- a/fedora_business_cards/frontend.py
+++ b/fedora_business_cards/frontend.py
@@ -23,7 +23,7 @@ whatnot, but for now just has a command-line interface.
"""
from optparse import OptionParser
-from . import config
+import config
import os
import sys