cast version_num to string before comparing
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Tue, 29 Nov 2011 21:13:11 +0000 (16:13 -0500)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Tue, 29 Nov 2011 21:13:11 +0000 (16:13 -0500)
sfa/rspecs/version_manager.py

index 66bad74..caf2d23 100644 (file)
@@ -31,7 +31,7 @@ class VersionManager:
         retval = None
         for version in self.versions:
             if type is None or type.lower() == version.type.lower():
-                if version_num is None or version_num == version.version:
+                if version_num is None or str(version_num) == version.version:
                     if content_type is None or content_type.lower() == version.content_type.lower() \
                       or version.content_type == '*':
                         retval = version