Minor update

This commit is contained in:
Miroslav Stampar 2013-01-14 16:21:40 +01:00
parent a5a309212a
commit 0c2474cc22

View File

@ -1,3 +1,10 @@
#!/usr/bin/env python
"""
Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
class xrange(object): class xrange(object):
""" """
Advanced implementation of xrange (supports slice/copy/etc.) Advanced implementation of xrange (supports slice/copy/etc.)
@ -47,11 +54,7 @@ class xrange(object):
return self._len() return self._len()
def _len(self): def _len(self):
try: return max(0, int((self.stop - self.start) / self.step))
return max(0, int((self.stop - self.start) / self.step))
except Exception, ex:
import pdb
pdb.set_trace()
def __getitem__(self, index): def __getitem__(self, index):
if isinstance(index, slice): if isinstance(index, slice):