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

When the ShellCommand or its subclass initialize a consistency-breaking instance, is it needed to do anything automatically? #6

Open
thejimmylin opened this issue Aug 5, 2020 · 1 comment

Comments

@thejimmylin
Copy link
Owner

Say,

>>> fsc = FortiSetCommand("    set service 'service tcp 8080-8080 udp 0-0'\n", quote_char='"')
>>> fsc.is_consistent
False
>>> fsc.split_command
['set', 'service', 'service tcp 8080-8080 udp 0-0']
>>> fsc.split_command = fsc.split_command
>>> fsc
<FortiSetCommand: '    set service "service tcp 8080-8080 udp 0-0"\n'>
>>> 

This seems weird because

fsc.split_command = fsc.split_command

should not do anything appearantly, but it did.

@thejimmylin thejimmylin added enhancement New feature or request and removed enhancement New feature or request labels Aug 6, 2020
@thejimmylin
Copy link
Owner Author

May be we can added a attribute "cleaned" to replace the "raw", and "raw" would be left inconsistent state, we use "cleaned" anyway.

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

No branches or pull requests

1 participant