Skip to content

Multiple errors on Windows #15

@tushev

Description

@tushev

With the following code

geoip = GeoIP2Fast()
response = geoip.lookup(ip_address)

on Windows, there is always an error in console like:

ps: unknown option -- o
Try `ps --help' for more information.

I believe this is due to this line:

result = subprocess.check_output(['ps', '-p', str(os.getpid()), '-o', 'rss='])

Could you please fix this by checking what OS is actually running?
So, when we're on Windows, it's better not to invoke ps PowerShell interpreter without need...

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions