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

caller.py assumes a lot on the environment #1

Open
dhrp opened this issue Aug 18, 2016 · 0 comments
Open

caller.py assumes a lot on the environment #1

dhrp opened this issue Aug 18, 2016 · 0 comments

Comments

@dhrp
Copy link
Contributor

dhrp commented Aug 18, 2016

rtlite.app.sip.caller has a couple of issues

  • it assumes socket(gethostbyname(socket.gethostname)) returns an IP, but not all machines have their /etc/hosts file setup correctly for this to work. caller.py currently throws something like
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
  • it assumes os.getlogin() works, but this doesn't work when you're not logged in as a user (e.g. when you're running in a Docker container).

I did a quick looks and it seems to be hard to make these things work in a true cross-platform way, so I suggest catching the errors, outputting a helpful message and quitting. And then adding a flag for setting hostname and user.

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

No branches or pull requests

1 participant