Added random named pipe support to the OfficeConverter pipe method

This commit is contained in:
Roberto Rosario
2011-11-22 01:22:59 -04:00
parent a6a00cbc15
commit f8dbfc068a
2 changed files with 10 additions and 2 deletions

View File

@@ -3,6 +3,8 @@ import os
import re
import types
import tempfile
import string
import random
from django.utils.http import urlquote as django_urlquote
from django.utils.http import urlencode as django_urlencode
@@ -358,8 +360,13 @@ def validate_path(path):
return True
def encapsulate(function):
# Workaround Django ticket 15791
# Changeset 16045
# http://stackoverflow.com/questions/6861601/cannot-resolve-callable-context-variable/6955045#6955045
return lambda: function
def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for x in range(size))