Permalink
Browse files

Merge pull request #31 from bernardogalindo/bugfix/configuration_not_…

…found

start to read args from 2 position and deleted extra validation
  • Loading branch information...
2 parents 0ec80be + 7775e49 commit 9c700368292922c27fbbd0fed0f7258fb80e1145 @gka gka committed Mar 30, 2012
Showing with 1 addition and 6 deletions.
  1. +1 −6 kartograph/cli.py
View
@@ -23,18 +23,13 @@ def main():
cfg = {}
output = None
opt_src = None
- opts, args = getopt.getopt(sys.argv[3:], 'c:o:', ['config=', 'output='])
+ opts, args = getopt.getopt(sys.argv[2:], 'c:o:', ['config=', 'output='])
for o, a in opts:
if o in ('-c', '--config'):
opt_src = a
elif o in ('-o', '--output'):
output = a
- if opt_src is None and len(sys.argv) > 2:
- opt_src = sys.argv[2]
- else:
- raise KartographError('you need to pass a map configuration (json/yaml)')
-
# check and load map configuration
if os.path.exists(opt_src):
t = open(opt_src, 'r').read()

0 comments on commit 9c70036

Please sign in to comment.