Commits

catapela  committed da5a8ed

some changes

  • Participants
  • Parent commits 797a7f9

Comments (0)

Files changed (1)

File dynamicLink/__init__.py

     __docformat__ = 'txt'
 
 def CKINST():
+    """function to find problems of the installation."""
+
     print('I try to find errors for you!')
     djv = django.VERSION
     greatest_dlv = version.RELEASE_DJANGO[0]
     smalest_dlv = version.RELEASE_DJANGO[0]
 
+    def strform(val):
+        """returns formated version tuples"""
+        return str(val).strip('()').replace(' ', '').replace(',','.')
+
     # find greatest and smallest possible django version for dynamic link
     for dlv in version.RELEASE_DJANGO:
         if greatest_dlv < dlv:
     # check dynaic link dependences
     if djv < smalest_dlv:
         print('Django %s is not supported. With this version of dynamicLink, Django %s is recommended. Use "pip install django==%s.X"'\
-        % (str(djv), str(greatest_dlv).strip('()').replace(' ', ''), str(greatest_dlv).strip('()').replace(' ', '') ))
+        % (str(djv), strform(greatest_dlv), strform(greatest_dlv) ))
     elif djv > greatest_dlv:
         print('This Version of dynamicLink (try: dynamicLink.VERSION) needs an older Django release (try: dynamicLink.RELEASE_DJANGO).' \
         'Try "pip install --upgrade django-dynamic-link" or use "pip install django==%s.X". '\
-        % str(greatest_dlv).strip('()').replace(' ', ''))
+        % strform(greatest_dlv))
     elif sys.version_info < version.PYTHON:
-        print('dynamicLink depends on python %s or higher.' % str(version.PYTHON))
+        print('dynamicLink depends on python %s or higher.' % strform(version.PYTHON))
     else:
         print("No errors. All seems fine!")