raise
return result
+ def post_data(self, url, content):
+ request = urllib2.Request(url, content)
+ result = urllib2.urlopen(request).read().strip()
+ return result
+
def hit_url(self, url ):
fn_urlopen = self.get_jenkins_obj().get_opener()
try:
def get_config(self):
'''Returns the config.xml from the job'''
return self.hit_url("%(baseurl)s/config.xml" % self.__dict__)
+
+ def update_config(self, config):
+ '''Update the config.xml to the job'''
+ return self.post_data("%(baseurl)s/config.xml" % self.__dict__, jobconfig)