def gen_downloads(app_dir, md5):
 try:
  print '[INFO] Generating Downloads'
  directory = os.path.join(app_dir, 'java_source/')
  dwd_dir = os.path.join(settings.DWD_DIR, (md5 + '-java.zip'))
  zipf = zipfile.ZipFile(dwd_dir, 'w')
  zipdir(directory, zipf)
  zipf.close()
  directory = os.path.join(app_dir, 'smali_source/')
  dwd_dir = os.path.join(settings.DWD_DIR, (md5 + '-smali.zip'))
  zipf = zipfile.ZipFile(dwd_dir, 'w')
  zipdir(directory, zipf)
  zipf.close()
 except:
  PrintException('[ERROR] Generating Downloads')

def gen_downloads ( app_dir , md5 ) : try : print '[INFO] Generating Downloads' directory = os . path . join ( app_dir , 'java_source/' ) dwd_dir = os . path . join ( settings . DWD_DIR , ( md5 + '-java.zip' ) ) zipf = zipfile . ZipFile ( dwd_dir , 'w' ) zipdir ( directory , zipf ) zipf . close ( ) directory = os . path . join ( app_dir , 'smali_source/' ) dwd_dir = os . path . join ( settings . DWD_DIR , ( md5 + '-smali.zip' ) ) zipf = zipfile . ZipFile ( dwd_dir , 'w' ) zipdir ( directory , zipf ) zipf . close ( ) except : PrintException ( '[ERROR] Generating Downloads' )
generate downloads for java and smali .