diff options
author | eliott <eliott@cactuswax.net> | 2008-04-16 19:55:32 -0700 |
---|---|---|
committer | eliott <eliott@cactuswax.net> | 2008-04-16 19:55:32 -0700 |
commit | b81e11f0602e90f44989dc95f2cd09838df87e11 (patch) | |
tree | f2a108f1894311870f0eed10ee8e8ed6fca6dea8 /scripts | |
parent | f5d9d687d342209f3badd1c04ebc9d72ac559011 (diff) |
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-x | scripts/reporead.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/reporead.py b/scripts/reporead.py index 68c77ebe..958278b3 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': |