summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authoreliott <eliott@cactuswax.net>2008-04-17 04:55:32 +0200
committereliott <eliott@cactuswax.net>2008-04-17 04:55:32 +0200
commitb81e11f0602e90f44989dc95f2cd09838df87e11 (patch)
treef2a108f1894311870f0eed10ee8e8ed6fca6dea8 /scripts
parentf5d9d687d342209f3badd1c04ebc9d72ac559011 (diff)
downloadarchweb-b81e11f0602e90f44989dc95f2cd09838df87e11.tar.gz
archweb-b81e11f0602e90f44989dc95f2cd09838df87e11.tar.xz
Added a test for what is effectively packages with super long descriptions.
Chop so we don't throw mysql errors when we try to commit.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/reporead.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/reporead.py b/scripts/reporead.py
index 68c77eb..958278b 100755
--- a/scripts/reporead.py
+++ b/scripts/reporead.py
@@ -84,6 +84,10 @@ class Pkg(object):
if len(val[x]) == 0:
logger.warning("Package %s has no %s" % (selfdict['name'],x))
selfdict[x] = ''.join(val[x])
+ # make sure we don't have elements larger than the db char
+ # fields
+ if len(selfdict[x]) > 255:
+ selfdict[x] = selfdict[x][:254]
elif x == 'force':
selfdict[x] = True
elif x == 'version':