From 3f7505a50bc6b9b14809f921e977b13c69319db2 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 15 Sep 2020 21:26:53 +0200 Subject: Update to python3 --- src/git_tftpd/backend.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/git_tftpd/backend.py') diff --git a/src/git_tftpd/backend.py b/src/git_tftpd/backend.py index 6fae5bd..2d45916 100644 --- a/src/git_tftpd/backend.py +++ b/src/git_tftpd/backend.py @@ -7,12 +7,11 @@ from tftp.util import deferred from twisted.python.context import get from twisted.python.filepath import FilePath, InsecurePath -from zope import interface +from zope.interface import implementer +@implementer(IBackend) class GitBackend(object): - interface.implements(IBackend) - def __init__(self, base_path): self.base_path = base_path self.base = FilePath(base_path) @@ -25,6 +24,6 @@ class GitBackend(object): def get_writer(self, file_name): try: target_path = self.base.descendant(file_name.split("/")) - except InsecurePath, e: + except InsecurePath as e: raise AccessViolation("Insecure path: %s" % e) return GitWriter(target_path, self.base_path, get('remote')) -- cgit v1.2.3-1-g7c22