def get_plaintext_body_by_id(self, id): if id < len(self.conversations) and self.conversations[id].magic_ext == "GZ": data, name = CTCore.ungzip(id) else: data = self.get_body_by_id(id) return data
def get_plaintext_body_by_id(self, id): if id < len(self.conversations ) and self.conversations[id].magic_ext == "GZ": data, name = CTCore.ungzip(id) else: data = self.get_body_by_id(id) return data
def do_ungzip(self,line): try: l = line.split(" ") if (l[0] == ""): self.help_ungzip() else: if l[0].lower() == "all": CTCore.ungzip_all() else: id = int(l[0]) if in_range(id): obj_num, name = CTCore.ungzip(id) if obj_num != -1: print " GZIP Decompression of object {} ({}) successful!".format(str(id), name) print " New object created: {}".format(obj_num) + newLine else: CTCore.show_errors() except Exception,e: print str(e)
def do_ungzip(self, line): try: l = line.split(" ") if (l[0] == ""): self.help_ungzip() else: if l[0].lower() == "all": CTCore.ungzip_all() else: id = int(l[0]) if in_range(id): obj_num, name = CTCore.ungzip(id) if obj_num != -1: print " GZIP Decompression of object {} ({}) successful!".format( str(id), name) print " New object created: {}".format( obj_num) + newLine else: CTCore.show_errors() except Exception, e: print str(e)