def handleChannelManifest(androidmanifestfile, channelConfig): cFlag = channelConfig['game_info']['channel_flag'] if cFlag == 'huawei': if channelConfig['game_info'].has_key('huawei_app_id'): file_utils.replaceStringAtFile(androidmanifestfile, "${HUAWEI_APPID}", (channelConfig['game_info']['huawei_app_id']).encode('utf8')) if channelConfig['game_info'].has_key('huawei_cp_id'): file_utils.replaceStringAtFile(androidmanifestfile, "${HUAWEI_CPID}", (channelConfig['game_info']['huawei_cp_id']).encode('utf8')) elif cFlag == 'oppo': if channelConfig['game_info'].has_key('oppo_app_key'): file_utils.replaceStringAtFile(androidmanifestfile, "${OPPO_APPKEY}", (channelConfig['game_info']['oppo_app_key']).encode('utf8')) elif cFlag == 'vivo': pass elif cFlag=='qihoo': #360 if channelConfig['game_info'].has_key('qihoo_app_id'): file_utils.replaceStringAtFile(androidmanifestfile, "${QIHOO_APPID}", (channelConfig['game_info']['qihoo_app_id']).encode('utf8')) if channelConfig['game_info'].has_key('qihoo_app_key'): file_utils.replaceStringAtFile(androidmanifestfile, "${QIHOO_APPKEY}", (channelConfig['game_info']['qihoo_app_key']).encode('utf8')) if channelConfig['game_info'].has_key('qihoo_app_key') and channelConfig['game_info'].has_key('qihoo_app_Secret'): qihoo_app_key = channelConfig['game_info']['qihoo_app_key'] qihoo_appSecret = channelConfig['game_info']['qihoo_app_Secret'] qihoo_priatekey = md5util.md5(qihoo_appSecret + "#" + qihoo_app_key) file_utils.replaceStringAtFile(androidmanifestfile, "${QIHOO_PRIATEKEY}", qihoo_priatekey.encode('utf8'))
def setWmd5(self): self.wmd5 = md5(str(self.weiboid) + str(self.content) + str(self.ftime) + str(self.upvotes) + str(self.forwards) + str(self.reviews))
def setWmd5(self): self.wmd5 = md5( str(self.weiboid) + str(self.school) + str(self.enrolltime))
def setWmd5(self): self.wmd5 = md5(str(self.weiboid) + str(self.school) + str(self.enrolltime))
def create_token(): return md5(str(uuid.uuid1()))