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

vcs.Canvas.isinfile return value consistency #46

Open
chaosphere2112 opened this issue Nov 23, 2016 · 1 comment
Open

vcs.Canvas.isinfile return value consistency #46

chaosphere2112 opened this issue Nov 23, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@chaosphere2112
Copy link
Contributor

isinfile implementation

@doutriaux1 @chaosphere2112 Should we make this thing return 0 when it doesn't find what it's looking for?
I would think that we should do that to be consistent.

Migrated from: CDAT/cdat#2109

@ghost
Copy link

ghost commented Dec 12, 2016

@doutriaux1 @chaosphere2112, on further inspection it looks like this doesn't even work:

>>> a=vcs.init()
>>> box=a.getboxfill()
>>> a.scriptobject(box, 'deft_box.py')
>>> a.scriptobject(box, 'deft_box') # json format
>>> a.isinfile(box, 'deft_box.json')
>>> a.isinfile(box, 'deft_box.py')

One or both of these should return 1, but neither returns anything.
I think we either have to scrap this or re-write the function.

I can make it work for .py files by changing the line:
key = gm + '_' + nm + '(' to key = '__' + gm + '__' + nm

@doutriaux1 doutriaux1 modified the milestone: 3.0 May 5, 2017
@doutriaux1 doutriaux1 modified the milestones: 3.0, post 3.0 Mar 29, 2018
@doutriaux1 doutriaux1 modified the milestones: 8.1, 8.2 Mar 27, 2019
@doutriaux1 doutriaux1 self-assigned this Apr 9, 2019
@doutriaux1 doutriaux1 added the bug label Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants