def test(self): """ generated source for method test """ query = TranslationsQuery("javatestsuite") query.setBasicAuth("javatestuser", "asdf1234") try: query.doQuery() print query.getTranslationsZipFile() except Exception as e: self.fail("Exception" + str(e))
def pull(self, targetDirectory): """ generated source for method pull """ query = TranslationsQuery(self.myProject.getProjectName()) query.setBasicAuth(self.myProject.getUsername(), self.myProject.getPassword()) try: query.doQuery() zipFile = query.getTranslationsZipFile() self.unzip(zipFile, targetDirectory) except Exception as e: e.printStackTrace() raise GLException("Unable to download translations: " + str(e))
def pull_0(self): """ generated source for method pull_0 """ query = TranslationsQuery(self.myProject.getProjectName()) query.setBasicAuth(self.myProject.getUsername(), self.myProject.getPassword()) try: query.doQuery() return query.getTranslationsZipFile() except QueryException as e: if e.getStatusCode() == 401: raise GLException("Authentication error, please check your username and password" + str(e)) else: raise GLException("Error when processing the query: " + str(e)) except Exception as e: raise GLException("Unable to download translations: " + str(e))
def pull_0(self): """ generated source for method pull_0 """ query = TranslationsQuery(self.myProject.getProjectName()) query.setBasicAuth(self.myProject.getUsername(), self.myProject.getPassword()) try: query.doQuery() return query.getTranslationsZipFile() except QueryException as e: if e.getStatusCode() == 401: raise GLException( "Authentication error, please check your username and password" + str(e)) else: raise GLException("Error when processing the query: " + str(e)) except Exception as e: raise GLException("Unable to download translations: " + str(e))