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

Turn get_connections() 'status' strings into constants #367

Closed
giampaolo opened this issue May 23, 2014 · 5 comments
Closed

Turn get_connections() 'status' strings into constants #367

giampaolo opened this issue May 23, 2014 · 5 comments

Comments

@giampaolo
Copy link
Owner

From g.rodola on April 12, 2013 20:25:47

Same as we to for IOPRIO_* and STATUS_* constants: 
https://code.google.com/p/psutil/wiki/Documentation#Constants As of now we have:

>>> p.get_connections()
[connection(fd=115, family=2, type=1, local_address=('10.0.0.1', 48776),
            remote_address=('93.186.135.91', 80), status='ESTABLISHED'),

'status' field should return a constant object [1] which defaults to int but 
can be nicely represented via str as in:

>>> p.get_connections()[0].status
0
>>> str(p.get_connections()[0].status)
'ESTABLISHED'
>>>


[1] 
https://code.google.com/p/psutil/source/browse/psutil/_common.py?spec=svnc6127ffef817129b411f84249b7496e803887dad&r=563562aba003010d4a6612a101f0855d75d80cf9#33

Original issue: http://code.google.com/p/psutil/issues/detail?id=367

@giampaolo giampaolo self-assigned this May 23, 2014
@giampaolo
Copy link
Owner Author

From g.rodola on April 23, 2013 17:59:50

Status: Duplicate
Labels: -Type-Enhancement Type-Defect OpSys-FreeBSD
Mergedinto: 370

@giampaolo
Copy link
Owner Author

From g.rodola on April 23, 2013 18:03:27

Status: New
Labels: -Type-Defect -OpSys-FreeBSD Type-Enhancement
Mergedinto:

@giampaolo
Copy link
Owner Author

From g.rodola on May 31, 2013 07:36:31

Fixed in fca2d639ecd1.

Status: FixedInHG
Labels: Milestone-0.7.2

@giampaolo
Copy link
Owner Author

From g.rodola on June 08, 2013 05:23:24

Labels: -Milestone-0.7.2 Milestone-1.0.0

@giampaolo
Copy link
Owner Author

From g.rodola on July 11, 2013 01:54:35

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant