Moving setuptools and twitools to subdirs
This commit is contained in:
parent
9a4ce98f2d
commit
61d049a01f
2 changed files with 4 additions and 2 deletions
|
@ -1,11 +1,13 @@
|
|||
import configparser
|
||||
|
||||
conffile = "config.cfg"
|
||||
|
||||
class SetupException(Exception):
|
||||
def __str__(self):
|
||||
return "Seems like config.cfg has not been created yet. Run setup.py to do so."
|
||||
|
||||
def getSetting(section, setting):
|
||||
config = configparser.RawConfigParser()
|
||||
config.read('config.cfg')
|
||||
config.read(conffile)
|
||||
return config.get(section, setting)
|
||||
|
|
@ -2,7 +2,7 @@ import setuptools, tweepy
|
|||
|
||||
def cke():
|
||||
try:
|
||||
return getSetting("Twitter", "cke")
|
||||
return setuptools.getSetting("Twitter", "cke")
|
||||
except:
|
||||
raise setuptools.SetupException()
|
||||
|
Loading…
Reference in a new issue