StackStorm / st2sdk

This repository contains different utilities and tools which help with the StackStorm integration pack development.
Apache License 2.0
10 stars 11 forks source link

st2sdk doesn't parse top level option #7

Open userlocalhost opened 7 years ago

userlocalhost commented 7 years ago

Hi,

When I execute following command,

$ st2sdk -h

an exception is occurred.

vagrant@ubuntu2:~$ st2sdk -h
Traceback (most recent call last):
  File "/usr/local/bin/st2sdk", line 9, in <module>
    load_entry_point('st2sdk==0.2.0', 'console_scripts', 'st2sdk')()
  File "/usr/local/lib/python2.7/dist-packages/st2sdk-0.2.0-py2.7.egg/st2sdk/shell.py", line 25, in main
    app.onecmd(' '.join(sys.argv[1:]))
  File "/usr/local/lib/python2.7/dist-packages/cmd2.py", line 885, in onecmd
    statement = self.parsed(line)
  File "/usr/local/lib/python2.7/dist-packages/cmd2.py", line 767, in parsed
    result = self.parser.parseString(s)
  File "/usr/local/lib/python2.7/dist-packages/pyparsing.py", line 1617, in parseString
    raise exc
pyparsing.ParseException: Expected {{stringEnd ^ "
EOF"} | {{{{} ^ {~{{}} W:(!#$%...)}} SkipTo:({";"}) {";"}} SkipTo:({{">>" | {WordStart ">"} | Re:('[^=]>')} ^ "|" ^ stringEnd ^ "
EOF"}) [{"|" SkipTo:({{">>" | {WordStart ">"} | Re:('[^=]>')} ^ stringEnd ^ "
EOF"})}] [{{">>" | {WordStart ">"} | Re:('[^=]>')} SkipTo:({stringEnd ^ "
EOF"})}]} | {{{~{{}} W:(!#$%...)} SkipTo:({{";"} ^ stringEnd ^ "
EOF" ^ "|" ^ {">>" | {WordStart ">"} | Re:('[^=]>')}})} [{";"}] [{"|" SkipTo:({{">>" | {WordStart ">"} | Re:('[^=]>')} ^ stringEnd ^ "
EOF"})}] [{{">>" | {WordStart ">"} | Re:('[^=]>')} SkipTo:({stringEnd ^ "
EOF"})}]} | {{{} ^ {~{{}} W:(!#$%...)}} SkipTo:({lineEnd lineEnd}) {lineEnd lineEnd}} | {{} SkipTo:({stringEnd ^ "
EOF"})}} (at char 0), (line:1, col:1)
vagrant@ubuntu2:~$ 

Here is my environment.

vagrant@ubuntu2:~$ python --version
Python 2.7.6
vagrant@ubuntu2:~$ pip show st2sdk
---
Name: st2sdk
Version: 0.2.0
Location: /usr/local/lib/python2.7/dist-packages/st2sdk-0.2.0-py2.7.egg
Requires: six, cmd2, jinja2
vagrant@ubuntu2:~$ 

Thank you.

userlocalhost commented 7 years ago

Sorry, it seems to the problem of the cmd2 package.

And the usage is written in README, so this problem may be trivial.

Kami commented 7 years ago

Thanks for the report - will look into it as soon as I get a chance :)