Django

Code

Ticket #7848: dead.code.diff

File dead.code.diff, 2.8 kB (added by julien, 6 months ago)
  • django/django/http/multipartparser.py

    old new  
    162162                                          force_unicode(data, encoding, errors='replace')) 
    163163                elif item_type == FILE: 
    164164                    # This is a file, use the handler... 
    165                     file_successful = True 
    166165                    file_name = disposition.get('filename') 
    167166                    if not file_name: 
    168167                        continue 
     
    209208                                    break 
    210209 
    211210                    except SkipFile, e: 
    212                         file_successful = False 
    213211                        # Just use up the rest of this file... 
    214212                        exhaust(field_stream) 
    215213                    else: 
     
    515513        else: 
    516514            end = index 
    517515            next = index + len(self._boundary) 
    518             data_len = len(data) - 1 
    519516            # backup over CRLF 
    520517            if data[max(0,end-1)] == '\n': 
    521518                end -= 1 
    522519            if data[max(0,end-1)] == '\r': 
    523520                end -= 1 
    524             # skip over --CRLF 
    525             #if data[min(data_len,next)] == '-': 
    526             #    next += 1 
    527             #if data[min(data_len,next)] == '-': 
    528             #    next += 1 
    529             #if data[min(data_len,next)] == '\r': 
    530             #    next += 1 
    531             #if data[min(data_len,next)] == '\n': 
    532             #    next += 1 
    533521            return end, next 
    534522 
    535523def exhaust(stream_or_iterable): 
  • django/django/db/models/sql/query.py

    old new  
    12141214                raise MultiJoin(pos + 1) 
    12151215            if model: 
    12161216                # The field lives on a base class of the current model. 
    1217                 alias_list = [] 
    12181217                for int_model in opts.get_base_chain(model): 
    12191218                    lhs_col = opts.parents[int_model].column 
    12201219                    dedupe = lhs_col in opts.duplicate_targets 
  • django/django/views/debug.py

    old new  
    145145            'line': line, 
    146146            'name': origin.name, 
    147147        } 
    148         if hasattr(self.exc_value, 'exc_info') and self.exc_value.exc_info: 
    149             exc_type, exc_value, tb = self.exc_value.exc_info 
    150148 
    151149    def _get_lines_from_file(self, filename, lineno, context_lines, loader=None, module_name=None): 
    152150        """