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

[BUG] pass different delimiter for compare_operator in loop state module #59701

Open
amalaguti opened this issue Mar 4, 2021 · 2 comments
Open
Assignees
Labels
Bug broken, incorrect, or confusing behavior Windows
Milestone

Comments

@amalaguti
Copy link

Description
loop.until_no_eval module should be able to pass a different delimiter for the compare_operator function.
This is going to be useful for instance when using data.subdict_match function to compare something like (Windows registry)
'vdata:C:\Program Files'
Here the : in 'C:' is seen as a delimiter.

I have altered line #214 in this module to pass a hardcoded delimiter,
cmp_res = comparator(res, expected, delimiter='|')
This worked fine.

@amalaguti amalaguti added the Bug broken, incorrect, or confusing behavior label Mar 4, 2021
@twangboy
Copy link
Contributor

twangboy commented Mar 6, 2021

What module? The above link takes you to issue 214 instead of line number 214.

@twangboy twangboy added the info-needed waiting for more info label Mar 6, 2021
@twangboy twangboy added this to the Blocked milestone Mar 6, 2021
@amalaguti
Copy link
Author

amalaguti commented Mar 8, 2021

@twangboy Hi Shane, states module loop.py

Wait for registry value in place:
  loop.until_no_eval:
    - name: reg.read_value
    \# the colon in expected: 'C:\' causes delimiter problem in data_subdict_match
    - expected: 'vdata:C:\Program Files (x86)\Google\Chrome\Application'
    - compare_operator: data.subdict_match
     \# a - delimiter: argument could be used to pass a delimiter to data.subdict_match
    - period: 5
    - timeout: 15
    - init_wait: 3
    - args:
      - HKLM
      - SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe
    - kwargs:
        vname: Path

@twangboy twangboy removed info-needed waiting for more info needs-triage labels Mar 9, 2021
@twangboy twangboy modified the milestones: Blocked, Approved Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Windows
Projects
None yet
Development

No branches or pull requests

4 participants