slight cleaning for webserver
This commit is contained in:
@@ -119,11 +119,11 @@ def add_single(conn,filename,change=False,hash=None,minsize=0,fullfile=False):
|
||||
if hash==None:
|
||||
hash=get_md5(filename,fullfile)
|
||||
ftime=os.path.getmtime(filename)
|
||||
mime=MIME.file(filename.encode('UTF-8'))
|
||||
mime=MIME.file(str(filename.encode('UTF-8')))
|
||||
except IOError:
|
||||
print("File '%s' not found. Bad link?"%(filename,))
|
||||
return
|
||||
except UnicodeDecodeError:
|
||||
except (UnicodeDecodeError, TypeError):
|
||||
mime="NA"
|
||||
|
||||
if change:
|
||||
|
||||
Reference in New Issue
Block a user