1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Import unicode_literals

This commit is contained in:
Jeremy Stretch
2017-05-24 11:33:11 -04:00
parent 9aad8a7774
commit f21c6bca00
109 changed files with 320 additions and 131 deletions

View File

@ -1,4 +1,6 @@
from __future__ import unicode_literals
import os
from Crypto.Cipher import AES, PKCS1_OAEP, XOR
from Crypto.PublicKey import RSA
@ -12,7 +14,6 @@ from django.utils.encoding import force_bytes, python_2_unicode_compatible
from dcim.models import Device
from utilities.models import CreatedUpdatedModel
from .exceptions import InvalidKey
from .hashers import SecretValidationHasher
@ -301,8 +302,8 @@ class Secret(CreatedUpdatedModel):
def __str__(self):
if self.role and self.device:
return u'{} for {}'.format(self.role, self.device)
return u'Secret'
return '{} for {}'.format(self.role, self.device)
return 'Secret'
def get_absolute_url(self):
return reverse('secrets:secret', args=[self.pk])