Permalink
Browse files

enums

  • Loading branch information...
1 parent 6b10961 commit f8833f7fe4c8954c6665760a46ba0b2cd241b7ce @tantalor committed Apr 10, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 python/detect_license.py
View
@@ -8,6 +8,8 @@
RE_MIT = re.compile('The MIT License', flags=re.IGNORECASE)
RE_GPL = re.compile('GNU GENERAL PUBLIC LICENSE', flags=re.IGNORECASE)
+MIT_LICENSE = 'MIT License'
+GNU_LICENSE = 'GPL'
def detect_license(filename=None, url=None, reader=None):
if filename:
@@ -23,9 +25,9 @@ def detect_license(filename=None, url=None, reader=None):
license['year'] = year
license['author'] = author
if RE_MIT.search(line):
- license['type'] = 'MIT License'
+ license['type'] = MIT_LICENSE
if RE_GPL.search(line):
- license['type'] = 'GPL'
+ license['type'] = GNU_LICENSE
return license

0 comments on commit f8833f7

Please sign in to comment.