summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2017-03-24 22:08:41 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2017-03-24 22:08:41 +0100
commit3bc83277ea2d7eb58814451da8031507136d1e9c (patch)
tree9fe4b61809df4dce9daafa3dae0c1e7435d5d713
parent08e1dbb70cec7446ac5a2cd93dc7cc22f97d90bb (diff)
Use range instead of xrange.
Using xrange with small values such as 5 is pointless. Also, xrange doesn't exist in python 3.
-rw-r--r--pastepy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pastepy.py b/pastepy.py
index 1b3f221..0608faa 100644
--- a/pastepy.py
+++ b/pastepy.py
@@ -119,7 +119,7 @@ class Paste(object):
title = mp['title'].value.decode('utf-8') or None
text = mp['text'].value.decode('utf-8').replace('\r', '') or None
- hash = ''.join(random.choice(base62_alphabet) for x in xrange(5))
+ hash = ''.join(random.choice(base62_alphabet) for x in range(5))
try:
session = db.Session()