[web/http_headers] use classmethod decorator
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 08 Oct 2015 13:51:54 +0200
changeset 10798 3f24adbf971a
parent 10797 b4f8c0b98c29
child 10799 ec97974b9010
[web/http_headers] use classmethod decorator
web/http_headers.py
--- a/web/http_headers.py	Thu Oct 08 13:45:00 2015 +0200
+++ b/web/http_headers.py	Thu Oct 08 13:51:54 2015 +0200
@@ -463,6 +463,7 @@
     raise ValueError("Invalid true/false header value: %s" % value)
 
 class MimeType(object):
+    @classmethod
     def fromString(klass, mimeTypeString):
         """Generate a MimeType object from the given string.
 
@@ -472,8 +473,6 @@
         """
         return DefaultHTTPHandler.parse('content-type', [mimeTypeString])
 
-    fromString = classmethod(fromString)
-
     def __init__(self, mediaType, mediaSubtype, params={}, **kwargs):
         """
         @type mediaType: C{str}