Normalize handling of temporary file and directory creation.
This commit is contained in:
@@ -2,10 +2,10 @@ from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
from django.db import models
|
||||
|
||||
from common.utils import mkstemp
|
||||
from django_gpg.exceptions import DecryptionError
|
||||
from django_gpg.models import Key
|
||||
from documents.models import DocumentVersion
|
||||
@@ -34,7 +34,7 @@ class EmbeddedSignatureManager(models.Manager):
|
||||
)
|
||||
|
||||
def sign_document_version(self, document_version, key, passphrase=None, user=None):
|
||||
temporary_file_object, temporary_filename = tempfile.mkstemp()
|
||||
temporary_file_object, temporary_filename = mkstemp()
|
||||
|
||||
try:
|
||||
with document_version.open() as file_object:
|
||||
|
||||
Reference in New Issue
Block a user