-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# inspired from tophat/bin/uploadcredential.py
#
import getpass
-from sfa.util.py23 import xmlrpc_client
+import xmlrpc.client
class ManifoldUploader:
def username(self):
if not self._username:
- self._username = raw_input("Enter your manifold username: ")
+ self._username = input("Enter your manifold username: ")
return self._username
def password(self):
def platform(self):
if not self._platform:
- self._platform = raw_input(
+ self._platform = input(
"Enter your manifold platform [%s]: " % DEFAULT_PLATFORM)
if self._platform.strip() == "":
self._platform = DEFAULT_PLATFORM
def url(self):
if not self._url:
- self._url = raw_input(
+ self._url = input(
"Enter the URL for your manifold API [%s]: " % DEFAULT_URL)
if self._url.strip() == "":
self._url = DEFAULT_URL
# if not self._proxy:
# url=self.url()
# self.logger.info("Connecting manifold url %s"%url)
- # self._proxy = xmlrpc_client.ServerProxy(url, allow_none = True)
+ # self._proxy = xmlrpc.client.ServerProxy(url, allow_none = True)
# return self._proxy
url = self.url()
self.logger.debug("Connecting manifold url %s" % url)
- proxy = xmlrpc_client.ServerProxy(url, allow_none=True,
+ proxy = xmlrpc.client.ServerProxy(url, allow_none=True,
**turn_off_server_verify)
return proxy
self.logger.info(" V2 Update returned code %s and error >>%s<<" % (
retcod2['code'], retcod2['description']))
self.logger.debug("****** full retcod2")
- for k, v in retcod2.items():
+ for k, v in list(retcod2.items()):
self.logger.debug("**** %s: %s" % (k, v))
return False
except Exception as e: