Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nicer error when cwd is not playbook dir #11

Merged
merged 1 commit into from Aug 2, 2015

Conversation

msabramo
Copy link
Contributor

Instead of:

$ arm freeze
Traceback (most recent call last):
  File "/Users/marca/python/virtualenvs/smstack/bin/arm", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/Users/marca/dev/git-repos/ansible-role-manager/bin/arm", line 5, in <module>
    main()
  File "/Users/marca/dev/git-repos/ansible-role-manager/arm/main.py", line 48, in main
    args.func(args)
  File "/Users/marca/dev/git-repos/ansible-role-manager/arm/commands/freeze.py", line 19, in run
    _roles_directory = os.path.join(_root, 'roles')
  File "/Users/marca/python/virtualenvs/smstack/bin/../lib/python2.7/posixpath.py", line 77, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'bool' object has no attribute 'endswith'

we get:

$ arm freeze
can't find playbook.
use `arm init` to create recommended structure.

Instead of:

    $ arm freeze
    Traceback (most recent call last):
      File "/Users/marca/python/virtualenvs/smstack/bin/arm", line 6, in <module>
        exec(compile(open(__file__).read(), __file__, 'exec'))
      File "/Users/marca/dev/git-repos/ansible-role-manager/bin/arm", line 5, in <module>
        main()
      File "/Users/marca/dev/git-repos/ansible-role-manager/arm/main.py", line 48, in main
        args.func(args)
      File "/Users/marca/dev/git-repos/ansible-role-manager/arm/commands/freeze.py", line 19, in run
        _roles_directory = os.path.join(_root, 'roles')
      File "/Users/marca/python/virtualenvs/smstack/bin/../lib/python2.7/posixpath.py", line 77, in join
        elif path == '' or path.endswith('/'):
    AttributeError: 'bool' object has no attribute 'endswith'

we get:

    $ arm freeze
    can't find playbook.
    use `arm init` to create recommended structure.
ajmirsky added a commit that referenced this pull request Aug 2, 2015
Nicer error when cwd is not playbook dir
@ajmirsky ajmirsky merged commit ec7651b into mirskytech:master Aug 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants