From 671b4035ea150d446167ed2bc562338dde66328b Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sun, 7 Jul 2019 13:04:54 +0000 Subject: [PATCH] Fixed a syntax issue and removed debug calls. - Legacy-Id: 16421 --- ietf/utils/validators.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ietf/utils/validators.py b/ietf/utils/validators.py index aa627df7b..c982fccfa 100644 --- a/ietf/utils/validators.py +++ b/ietf/utils/validators.py @@ -78,11 +78,8 @@ def validate_mime_type(file, valid): # work around mis-identification of text where a line has 'virtual' as # the first word: if mime_type == 'text/x-c++' and re.search(rb'(?m)^virtual\s', raw): - mod = raw.replace(b'virtual', b' virtual')) + mod = raw.replace(b'virtual', b' virtual') mime_type, encoding = get_mime_type(mod) - debug.show('mime_type') - debug.show('encoding') - debug.show('valid') if valid and not mime_type in valid: raise ValidationError('Found content with unexpected mime type: %s. Expected one of %s.' % (mime_type, ', '.join(valid) ))