Esempio n. 1
0
 def update_package_channeldata(self, channel_name, package_name,
                                channeldata):
     package = self.get_package(channel_name, package_name)
     if package.channeldata:
         old_data = json.loads(package.channeldata)
     else:
         old_data = None
     data = channel_data.combine(old_data, channeldata)
     package.channeldata = json.dumps(data)
     self.db.commit()
Esempio n. 2
0
 def update_package_channeldata(self, channel_name, package_name, channeldata):
     package = self.get_package(channel_name, package_name)
     if package.channeldata:
         old_data = json.loads(package.channeldata)
     else:
         old_data = None
     data = channel_data.combine(old_data, channeldata)
     package.channeldata = json.dumps(data)
     package.url = data.get("home", "")
     package.platforms = ":".join(data.get("subdirs", []))
     self.db.commit()