Skip to content

subprocess.check_output(["ping", "-c", "3", hostname]) non-zero exit code 2 #126

@yurkomik

Description

@yurkomik

I wrote a method to check internet connection to host site.
simplified version look like this:

def network_check():
hostname = "google.com"
try:
response = subprocess.check_output(["ping", "-c", "3", hostname])
return response
except Exceprion as err:
return err

I run this in threading.Thread

This method works ok in linux and subprocess.check_output(["ping", "-c", "3", "google.com"]) works ok in Qpython console on android but in python-for-android&kivy i get exit code 2 (ping other errors)

I've spent hole evening trying to solve the problem. No results.
Regards, Yurij

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions