Minor patch for #1260

This commit is contained in:
Miroslav Stampar
2015-06-05 17:02:56 +02:00
parent ebc2a729c9
commit 8d7e915af7
2 changed files with 13 additions and 4 deletions

View File

@@ -1007,6 +1007,14 @@ def sanitizeStr(value):
return getUnicode(value).replace("\n", " ").replace("\r", "")
def getHeader(headers, key):
retVal = None
for _ in (headers or {}):
if _.upper() == key.upper():
retVal = headers[_]
break
return retVal
def checkFile(filename):
"""
Checks for file existence and readability