Closed teor2345 closed 7 years ago
I opened a PR against your branch with some small changes and tests: https://github.com/teor2345/pyasn/pull/1
I opened a PR against your branch with some small changes and tests: teor2345#1
@wagner-certat, I merged your PR and removed a comment that was copy-pasted, but doesn't apply to the new function.
I think we're good to go here.
Hi @teor2345, thank you for the PR. Can you tell me what your use-case is for this functionality? Where do you load the ipasn_string from?
Hi @teor2345, thank you for the PR. Can you tell me what your use-case is for this functionality? Where do you load the ipasn_string from?
We run a cooperating group of data collecting instances on different machines. They receive their configuration from a central point.
Here is the use case in detail:
This avoids the data collecting instances dumping the string to a file (they have no ability to write files) and then reading it out again using pyasn. It would be slower and more error-prone to write a file (for example, if the directory wasn't writeable, or the disk was full).
Merged, cheers.
If the ipasn data is already loaded into a string, this avoids creating a temporary file for ipasn_file.
This is implemented in a backwards-compatible way: the new ipasn_string argument is a keyword argument, and it is only used if ipasn_file is None.