eldarion / gondor-client

Official Gondor command line client
https://gondor.io
38 stars 12 forks source link

gondor sqldump does not work with Python 2.7.9rc1 #30

Open martey opened 9 years ago

martey commented 9 years ago
Dumping database... [ok]
Traceback (most recent call last):
  File "/home/martey/.virtualenvs/xxx/bin/gondor", line 9, in <module>
    load_entry_point('gondor==1.2.4', 'console_scripts', 'gondor')()
  File "/home/martey/.virtualenvs/xxx/lib/python2.7/site-packages/gondor/__main__.py", line 1014, in main
    }[args.command](args, env, config)
  File "/home/martey/.virtualenvs/xxx/lib/python2.7/site-packages/gondor/__main__.py", line 458, in cmd_sqldump
    response = urlopen(data["result"]["public_url"])
  File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1240, in https_open
    context=self._context)
  File "/usr/lib/python2.7/urllib2.py", line 1197, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>

Running gondor run primary manage.py sqlall also failed:

Attaching... Traceback (most recent call last):
  File "/home/martey/.virtualenvs/xxx/bin/gondor", line 9, in <module>
    load_entry_point('gondor==1.2.4', 'console_scripts', 'gondor')()
  File "/home/martey/.virtualenvs/xxx/lib/python2.7/site-packages/gondor/__main__.py", line 1014, in main
    }[args.command](args, env, config)
  File "/home/martey/.virtualenvs/xxx/lib/python2.7/site-packages/gondor/__main__.py", line 547, in cmd_run
    "ssl_version": ssl.PROTOCOL_SSLv3
AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'

Upgrading to 1.2.5 did not fix this issue. I think this is similar to https://github.com/s3tools/s3cmd/issues/426. I had access to another machine with Python2.7.3 which worked perfectly, but future users might not have that option.

brosner commented 9 years ago

Thanks for the report! This definitely needs to be fixed. I will be looking at this today.