Make config file a start parameter

This commit is contained in:
Ruud committed 2011-08-31 16:10:12 +02:00
1 parent 9bc7b11210
commit 5b3f6adae0
4 files changed
+31 -17

No files matched your search

+3 -3
View File
@@ -18,7 +18,7 @@ from couchpotato.core.logger import CPLog
log = CPLog(__name__)
# Get options via arg
from couchpotato.cli import getOptions
from couchpotato.runner import getOptions
options = getOptions(base_path, sys.argv[1:])
def start():
@@ -38,12 +38,12 @@ def start():
log.critical(e)
return 0
from couchpotato import cli
from couchpotato.runner import runCouchPotato
if __name__ == '__main__':
if os.environ.get('cp_main', 'false') == 'true':
try:
cli.cmd_couchpotato(options, base_path, sys.argv[1:])
runCouchPotato(options, base_path, sys.argv[1:])
except Exception, e:
log.critical(e)
else: