Permalink
Browse files

use request to get classifiers instead of release.getClassfiers

  • Loading branch information...
1 parent 1a675f3 commit 9cf4132f650eef334c37fbf981951628f0a56ef2 @toutpt toutpt committed Nov 16, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 Products/PloneSoftwareCenter/browser/pypi.py
View
12 Products/PloneSoftwareCenter/browser/pypi.py
@@ -353,14 +353,18 @@ def _get_package(self, normalized_name, name, version, msg=None):
return project, release
def _map_classifiers_to_compatibility(self, project, release):
- classifiers_id = release.getClassifiers()
versions = []
- for cid in classifiers_id:
+ CLASSIFIER_BASE = 'Framework :: Plone :: '
+ supported_versions = [classifier[len(CLASSIFIER_BASE):] for classifier in \
+ self.request.form.get('classifiers', [])\
+ if classifier.startswith(CLASSIFIER_BASE)]
+
+ for supported_version in supported_versions:
try:
- Decimal(cid)
+ Decimal(supported_version)
except InvalidOperation:
continue
- versions.append('Plone %s' % cid)
+ versions.append('Plone %s' % supported_version)
vocab = release.getCompatibilityVocab()
compats = []

0 comments on commit 9cf4132

Please sign in to comment.