def __init__(self): if not pkg_resources.resource_exists(__name__, 'config.cfg'): print 'Config file (config.cfg) is missing' # import ConfigParser # config = ConfigParser.ConfigParser() # config.add_section('NetworkSettings') # config.set('NetworkSettings', 'PublicKey', '<Enter Public Key>') # config.set('NetworkSettings', 'PrivateKey', '<Enter Private Key>') # config.set('NetworkSettings', 'Server', 'sandbox.droplr.com') # config.set('NetworkSettings', 'Port', '8069') # config.set('NetworkSettings', 'Scheme', 'http') # file = open('config.cfg', 'w') # config.write(file) # file.close() sys.exit(1) self._cfg = Config() new_version() if self._cfg.get('email') == None: # Time to login self.show_login() else: # Test the credentials if self.test_credentials(self._cfg.get('email'), self._cfg.get('passhash')) == True: self.start() else: self.logout()
def __init__(self): self._cfg = Config() new_version() if self._cfg.get("email") == None: # Time to login self.show_login() else: # Test the credentials if self.test_credentials(self._cfg.get("email"), self._cfg.get("passhash")) == True: self.start() else: self.logout()
def __init__(self): self._cfg = Config() new_version() if self._cfg.get('email') == None: # Time to login self.show_login() else: # Test the credentials if self.test_credentials(self._cfg.get('email'), self._cfg.get('passhash')) == True: self.start() else: self.logout()
def __init__(self): # check if there is a new version new_version() self._cfg = Config() if self._cfg.get('email') == None: # Time to login self.show_login() else: # Test the credentials if self.test_credentials(self._cfg.get('email'), self._cfg.get('passhash')) == True: self.login() else: self.relogin()