Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Fix last buggy entry of Machine.ls() output#15

Merged
gijzelaerr merged 1 commit into
gijzelaerr:masterfrom
eagafonov:strip_ls_output
May 17, 2018
Merged

Fix last buggy entry of Machine.ls() output#15
gijzelaerr merged 1 commit into
gijzelaerr:masterfrom
eagafonov:strip_ls_output

Conversation

@eagafonov

Copy link
Copy Markdown
Contributor

Fix for #13

Machine.ls() generate buggy last entry {'Name': u''}
It comes from empty line after stdout.split("\n")

In [15]: '1\n2\n'.split('\n')
Out[15]: ['1', '2', '']

Use strip() to chop trailing '\n'

Fix for gijzelaerr#13

Machine.ls() generate buggy last entry `{'Name': u''}`
It comes from empty line after `stdout.split("\n")`

```
In [15]: '1\n2\n'.split('\n')
Out[15]: ['1', '2', '']
```

Use strip() to chop trailing '\n'
@gijzelaerr gijzelaerr merged commit 17494fa into gijzelaerr:master May 17, 2018
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.

2 participants