File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ def parse_mime_type(mime_type):
32
32
33
33
type_parts = full_type .split ('/' ) if '/' in full_type else None
34
34
if not type_parts or len (type_parts ) > 2 :
35
- raise MimeTypeParseException ("Can't parse type \" {}\" " .format (full_type ))
35
+ raise MimeTypeParseException (
36
+ "Can't parse type \" {}\" " .format (full_type ))
36
37
37
38
(type , subtype ) = type_parts
38
39
Original file line number Diff line number Diff line change @@ -15,13 +15,16 @@ def get_version(filename):
15
15
return re .search ("__version__ = ['\" ]([^'\" ]+)['\" ]" , contents ).group (1 )
16
16
17
17
version = get_version ('mimeparse.py' )
18
+ if not version :
19
+ raise RuntimeError ('Cannot find version information' )
18
20
19
21
20
22
def read (fname ):
21
23
path = os .path .join (os .path .dirname (__file__ ), fname )
22
24
with codecs .open (path , encoding = 'utf-8' ) as fp :
23
25
return fp .read ()
24
26
27
+
25
28
setup (
26
29
name = "python-mimeparse" ,
27
30
py_modules = ["mimeparse" ],
You can’t perform that action at this time.
0 commit comments