Gandi / gandi.cli

⚠ ARCHIVED - Command line interface to Gandi.net products using the public API
http://cli.gandi.net/
GNU General Public License v3.0
347 stars 62 forks source link

Running under nohup causes 'Bad file descriptor' #299

Open pmatos opened 4 years ago

pmatos commented 4 years ago

There's a bad file descriptor error when running gandi dns update through nohup:

gandi dns update foo.com home A xx.xx.xx.xx.xx
Traceback (most recent call last):
  File "/home/pi/gandi-dnsupdate/venv/bin/gandi", line 10, in <module>
    sys.exit(main())
  File "/home/pi/gandi-dnsupdate/venv/local/lib/python2.7/site-packages/gandi/cli/__main__.py", line 8, in main
    cli(obj={})
  File "/home/pi/gandi-dnsupdate/venv/local/lib/python2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/gandi-dnsupdate/venv/local/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/pi/gandi-dnsupdate/venv/local/lib/python2.7/site-packages/gandi/cli/core/cli.py", line 163, in invoke
    click.Group.invoke(self, ctx)
  File "/home/pi/gandi-dnsupdate/venv/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/pi/gandi-dnsupdate/venv/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/pi/gandi-dnsupdate/venv/local/lib/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/gandi-dnsupdate/venv/local/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/pi/gandi-dnsupdate/venv/local/lib/python2.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/pi/gandi-dnsupdate/venv/local/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/pi/gandi-dnsupdate/venv/local/lib/python2.7/site-packages/gandi/cli/commands/dns.py", line 123, in update
    content = click.get_text_stream('stdin').read()
IOError: [Errno 9] Bad file descriptor